From: Jussi Koskela Date: Wed, 14 Jun 2017 12:08:03 +0000 (+0300) Subject: Fixed URI of the root resource in fail-safe import X-Git-Tag: v1.31.0~323 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F23%2F623%2F1;p=simantics%2Fplatform.git Fixed URI of the root resource in fail-safe import URIStringUtils.splitURI returns root URI in non-standard format, so fix it manually as a workaround. Otherwise ExternalEntities cannot be created under the root resource. refs #7299 Change-Id: Ie548eebba5c267617cb845df684b025b59c069f5 --- diff --git a/bundles/org.simantics.graph.db/src/org/simantics/graph/db/StreamingTransferableGraphImportProcess.java b/bundles/org.simantics.graph.db/src/org/simantics/graph/db/StreamingTransferableGraphImportProcess.java index 78c369f96..4894467e3 100644 --- a/bundles/org.simantics.graph.db/src/org/simantics/graph/db/StreamingTransferableGraphImportProcess.java +++ b/bundles/org.simantics.graph.db/src/org/simantics/graph/db/StreamingTransferableGraphImportProcess.java @@ -339,6 +339,10 @@ public class StreamingTransferableGraphImportProcess implements TransferableGrap Collections.sort(missing); for(String uri : missing) { String[] parts = URIStringUtils.splitURI(uri); + // URIStringUtils.splitURI returns root URI in non-standard format, so fix it manually as a workaround + if (parts[0].equals("http://")) { + parts[0] = "http:/"; + } Resource parent = resolvedParents.get(parts[0]); // TODO: proper exception message