]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterTable.java
isImmutable can NPE
[simantics/platform.git] / bundles / org.simantics.db.procore / src / fi / vtt / simantics / procore / internal / ClusterTable.java
index 355764d178138df429450ab7eac5ab565dac8d00..40b2530f2a569a4dedfdb7295095895871074f1d 100644 (file)
@@ -1139,11 +1139,14 @@ public final class ClusterTable implements IClusterTable {
         if(exist != null) return exist;
 
         ClusterI cluster = getClusterByResourceKey(id);
-        boolean result = cluster == null ? false : cluster.getImmutable();
-
-        markImmutable(cluster, result);
-        return result;
-
+        if(cluster == null) {
+               return false;
+        } else {
+               boolean result = cluster.getImmutable();
+               markImmutable(cluster, result);
+               return result;
+        }
+        
     }
 
     public void markImmutable(ClusterI cluster, boolean value) {