Skip to content

Commit

Permalink
CB-5447 npe fix (#2819)
Browse files Browse the repository at this point in the history
Co-authored-by: Daria Marutkina <[email protected]>
Co-authored-by: Ainur <[email protected]>
  • Loading branch information
3 people authored Aug 6, 2024
1 parent 23b7044 commit 6ca587a
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ public Integer getOrdinalPosition() {

@Property
public String getFullyQualifiedName() {
return object instanceof DBPQualifiedObject ? ((DBPQualifiedObject) object).getFullyQualifiedName(DBPEvaluationContext.UI) : getName();
return object instanceof DBPQualifiedObject
? ((DBPQualifiedObject) object).getFullyQualifiedName(DBPEvaluationContext.UI)
: getName();
}

@Property
Expand Down Expand Up @@ -151,7 +153,7 @@ public String[] getFeatures() {
return features.toArray(new String[0]);
}

private static void getObjectFeatures(DBSObject object, List<String> features) {
private void getObjectFeatures(DBSObject object, List<String> features) {
boolean isDiagramSupported = true;
if (object instanceof DBPScriptObject) features.add(OBJECT_FEATURE_SCRIPT);
if (object instanceof DBPScriptObjectExt) features.add(OBJECT_FEATURE_SCRIPT_EXTENDED);
Expand Down Expand Up @@ -181,7 +183,7 @@ private static void getObjectFeatures(DBSObject object, List<String> features) {
features.add(OBJECT_FEATURE_OBJECT_CONTAINER);
try {
Class<? extends DBSObject> childType = objectContainer.getPrimaryChildType(null);
Collection<? extends DBSObject> childrenCollection = objectContainer.getChildren(null);
Collection<? extends DBSObject> childrenCollection = objectContainer.getChildren(session.getProgressMonitor());
if (DBSTable.class.isAssignableFrom(childType) && childrenCollection != null) {
features.add(OBJECT_FEATURE_ENTITY_CONTAINER);
}
Expand Down

0 comments on commit 6ca587a

Please sign in to comment.