Skip to content

Engine: NPE instead of DatabaseMetadataException if the bucket is null during index creation #29

@giastfader

Description

@giastfader

ArcadeDB Version: 21.9.1-SNAPSHOT

JDK Version: N/A

OS: N/A

Expected behavior

DatabaseMetadataException should be raised

Actual behavior

NPE is raised, hiding the real exception and related error message

Steps to reproduce

I have no use case yet, but it's clear what happens looking at the code

    if (bucket == null)
      throw new DatabaseMetadataException(
          "Cannot create index on type '" + typeName + "' because the specified bucket '" + bucket.getName() + "' is not part of the type");

@lvca what the real message should be? Because if bucket is null something here is going very weird.

WDYT?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions