From: Antti Villberg Date: Tue, 18 Apr 2017 13:07:53 +0000 (+0300) Subject: Model export broke down due to internal resource changes X-Git-Tag: v1.29.0~107^2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F19%2F419%2F1;p=simantics%2Fplatform.git Model export broke down due to internal resource changes refs #7145 Change-Id: I799a57b37763b9def8313989a38afa5560389077 --- diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSource.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSource.java index e7fa24124..2d0fbcfe1 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSource.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSource.java @@ -228,7 +228,7 @@ public class ModelTransferableGraphSource implements TransferableGraphSource { @Override public int getIdentityCount() { - return configuration.roots.size() + state.externals.size() + 1; + return configuration.roots.size() + state.externals.size() + state.internalEntries.size() + 1; } @Override @@ -415,6 +415,8 @@ public class ModelTransferableGraphSource implements TransferableGraphSource { for(InternalEntry ie : state.internalEntries) { if(ie.parent != null && ie.name != null) { procedure.execute(resolveInternal(graph, support, ie, internalMap)); + } else { + throw new DatabaseException("Invalid internal entry " + ie); } } }