From: Jussi Koskela Date: Thu, 26 Oct 2017 10:08:06 +0000 (+0300) Subject: Prevent StringIndexOutOfBoundsException when resolving issue path X-Git-Tag: v1.31.0~93 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F45%2F1145%2F1;p=simantics%2Fplatform.git Prevent StringIndexOutOfBoundsException when resolving issue path refs #7577 Change-Id: Iaeac31b4d83a972fbcef8f3742321b9c0af219aa --- diff --git a/bundles/org.simantics.issues.common/src/org/simantics/issues/common/All.java b/bundles/org.simantics.issues.common/src/org/simantics/issues/common/All.java index d2120cd78..6eccb1755 100644 --- a/bundles/org.simantics.issues.common/src/org/simantics/issues/common/All.java +++ b/bundles/org.simantics.issues.common/src/org/simantics/issues/common/All.java @@ -71,6 +71,7 @@ public class All { if(issueRoot.equals(contextRoot)) { String uri = graph.getURI(parent); String contextURI = graph.getURI(contextRoot); + if (uri.equals(contextURI)) return ""; return IssueUtils.pathString(uri, contextURI.length()+1); } else { String uri = graph.getURI(parent);