X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.procore%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fprocore%2Fcluster%2FClusterSmall.java;fp=bundles%2Forg.simantics.db.procore%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fprocore%2Fcluster%2FClusterSmall.java;h=1a8af51433610146897dcfd1d99225bcbd60921d;hp=1b7dc0d32598374fb1b062c26987a580f0ab7964;hb=51f45bdf95551409666a04f92355638f83c018da;hpb=2c23dfe282591fe42aa9e755eace6bc4e3a86b29 diff --git a/bundles/org.simantics.db.procore/src/org/simantics/db/procore/cluster/ClusterSmall.java b/bundles/org.simantics.db.procore/src/org/simantics/db/procore/cluster/ClusterSmall.java index 1b7dc0d32..1a8af5143 100644 --- a/bundles/org.simantics.db.procore/src/org/simantics/db/procore/cluster/ClusterSmall.java +++ b/bundles/org.simantics.db.procore/src/org/simantics/db/procore/cluster/ClusterSmall.java @@ -1069,14 +1069,14 @@ final public class ClusterSmall extends ClusterImpl { public String toString() { if (deleted) return "ClusterSmall[" + getClusterId() + " - has been deleted or hasn't been created.]"; try { - final TIntHashSet set = new TIntHashSet(); - TIntShortHashMap map = foreignTable.getResourceHashMap(); - map.forEachKey(new TIntProcedure() { - @Override - public boolean execute(int value) { - set.add(value & 0xfffff000); - return true; - } + ForeignTableSmall ft = foreignTable; + if (ft == null) + return "ClusterSmall[" + getClusterId() + " - " + getNumberOfResources() + "]"; + TIntShortHashMap map = ft.getResourceHashMap(); + TIntHashSet set = new TIntHashSet(); + map.forEachKey(value -> { + set.add(value & 0xfffff000); + return true; }); return "ClusterSmall[" + getClusterId() + " - " + getNumberOfResources() + " - " + foreignTable.getResourceHashMap().size() + " - " + set.size() + "]"; } catch (Throwable e) {