]> gerrit.simantics Code Review - simantics/interop.git/commitdiff
Statement processing could match objects that were already matched. 39/4639/1
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Fri, 29 Jan 2021 14:41:27 +0000 (16:41 +0200)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Fri, 29 Jan 2021 14:41:27 +0000 (16:41 +0200)
gitlab #30

Change-Id: Ic8e5c3ac84f5a589c50a3a99161f128b6551bc6a

org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java

index 0c5aecc993bed308043f23d19ec997daa979bded..c59cbfccac76db6aa1e28e474f29163c833e040e 100644 (file)
@@ -516,6 +516,8 @@ public class GraphComparator {
                                                Statement rs = right.get(r);
                                                if (!comparableResources.contains(ls.getSubject(), rs.getSubject()))
                                                        continue;
+                                               if ((comparableResources.containsLeft(ls.getObject()) || comparableResources.containsRight(rs.getObject())) && !comparableResources.contains(ls.getObject(), rs.getObject()))
+                                                       continue;
                                                if (rcomp.compare(ls.getPredicate(),rs.getPredicate()) == 0) {
                                                        // compare objects (unreliable result is not accepted)
                                                        int comp = comparator.compare(g, ls.getObject(), rs.getObject());