From 97872f96afc18f4cd5b959d869fed80cd92f6aa1 Mon Sep 17 00:00:00 2001 From: Antti Villberg Date: Mon, 24 Jul 2017 15:54:19 +0300 Subject: [PATCH] isImmutable can NPE refs #7380 Change-Id: I8b1eac67b58664f0986dfeea5315f791721d8393 --- .../simantics/procore/internal/ClusterTable.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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) { -- 2.43.2