X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.procore%2Fsrc%2Ffi%2Fvtt%2Fsimantics%2Fprocore%2Finternal%2FClusterTable.java;h=df3b6904f3beb27060b094e6a604f57449d0ce38;hp=7df13315f8f68b093fdbf6cb91b0359b5bb909e1;hb=9f0fd59be54719b1fe9322d8fd37e4950857308c;hpb=b844ca924d129072e11f7e4c18918dd388a37e8c 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 7df13315f..df3b6904f 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 @@ -826,7 +826,7 @@ public final class ClusterTable implements IClusterTable { System.err.println("value " + cc.getValueIndex()[i] + " changed."); } } - final void refreshImportance(ClusterImpl c) { + final synchronized void refreshImportance(ClusterImpl c) { if (c.isWriteOnly()) return; @@ -900,7 +900,7 @@ public final class ClusterTable implements IClusterTable { } @SuppressWarnings("unchecked") - public final T getClusterByResourceKey(final int resourceKey) { + public synchronized final T getClusterByResourceKey(final int resourceKey) { int clusterKey = ClusterTraitsBase.getClusterKeyFromResourceKeyNoThrow(resourceKey); if (ClusterTraitsBase.isVirtualClusterKey(clusterKey)) throw new RuntimeException("Tried to get a persistent cluster for a virtual resource.");