From: Tuukka Lehtonen Date: Sat, 5 Aug 2017 08:56:17 +0000 (+0300) Subject: Fixed RVI.fromResourceFormat GUID RVI part parsing X-Git-Tag: v1.31.0~264^2~4 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=b4d40b271019ac79aa3003551ec89f1e15aed950;p=simantics%2Fplatform.git Fixed RVI.fromResourceFormat GUID RVI part parsing The code was skipping over the first character of GUID RVI parts producing invalid RVIs. This again resulted in the creation of invalid subscriptions etc. refs #7413 Change-Id: I755b79ca352355789846b2ff49858b757fea9c63 (cherry picked from commit 1051b77973cc1ff7363798f1fed018ddc356dc1d) --- diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/RVI.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/RVI.java index daae9b9c3..a5f22c83c 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/RVI.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/RVI.java @@ -407,8 +407,8 @@ public class RVI extends Bean { } } } - if (str.indexOf(":", pos+1) > -1) { - String x = str.substring(pos+1, end); + if (str.indexOf(":", pos) > -1) { + String x = str.substring(pos, end); if (!x.isEmpty()) { String[] parts = x.split(":"); if (parts.length == 3) {