From: Marko Luukkainen Date: Fri, 29 Jan 2021 14:41:27 +0000 (+0200) Subject: Statement processing could match objects that were already matched. X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=8b60ded31ab0047c731335acc1a2cccb844324d8;p=simantics%2Finterop.git Statement processing could match objects that were already matched. gitlab #30 Change-Id: Ic8e5c3ac84f5a589c50a3a99161f128b6551bc6a --- diff --git a/org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java b/org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java index 0c5aecc..c59cbfc 100644 --- a/org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java +++ b/org.simantics.interop/src/org/simantics/interop/test/GraphComparator.java @@ -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());