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;fp=bundles%2Forg.simantics.db.procore%2Fsrc%2Ffi%2Fvtt%2Fsimantics%2Fprocore%2Finternal%2FClusterTable.java;h=df3b6904f3beb27060b094e6a604f57449d0ce38;hp=7df13315f8f68b093fdbf6cb91b0359b5bb909e1;hb=0d9b90834ce56b292c00b1a39850ed842c3e4d42;hpb=e5db6157fd8722c946613d4e46d7aaf6bfa92609 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.");