]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Merge "Model export broke down due to internal resource changes"
authorHannu Niemistö <hannu.niemisto@semantum.fi>
Tue, 18 Apr 2017 14:03:01 +0000 (17:03 +0300)
committerGerrit Code Review <gerrit2@www.simantics.org>
Tue, 18 Apr 2017 14:03:01 +0000 (17:03 +0300)
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);
                                }
                        }
                }