From: Antti Villberg Date: Mon, 24 Jul 2017 12:54:19 +0000 (+0300) Subject: isImmutable can NPE X-Git-Tag: v1.31.0~264^2~30 X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commitdiff_plain;h=97872f96afc18f4cd5b959d869fed80cd92f6aa1;ds=sidebyside isImmutable can NPE refs #7380 Change-Id: I8b1eac67b58664f0986dfeea5315f791721d8393 --- diff --git a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterTable.java b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterTable.java index 355764d17..40b2530f2 100644 --- a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterTable.java +++ b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterTable.java @@ -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) {