Fixed RVI.fromResourceFormat GUID RVI part parsing
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Sat, 5 Aug 2017 08:56:17 +0000 (11:56 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Sat, 5 Aug 2017 09:11:39 +0000 (12:11 +0300)
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)

bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/RVI.java

index daae9b9c32f76cf5bc9a1c8b699aee6661f47f19..a5f22c83c1a44233bcce46550aefdab8a1b39dec 100644 (file)
@@ -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) {