]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Model export broke down due to internal resource changes 19/419/1
authorAntti Villberg <antti.villberg@semantum.fi>
Tue, 18 Apr 2017 13:07:53 +0000 (16:07 +0300)
committerAntti Villberg <antti.villberg@semantum.fi>
Tue, 18 Apr 2017 13:07:53 +0000 (16:07 +0300)
refs #7145

Change-Id: I799a57b37763b9def8313989a38afa5560389077

bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/ModelTransferableGraphSource.java

index e7fa24124a2ca1a72fca4955d320e385b87368de..2d0fbcfe18282dc733a8e6be4596a5c344be2bca 100644 (file)
@@ -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);
                                }
                        }
                }