]> gerrit.simantics Code Review - simantics/interop.git/commitdiff
Previous change broke comparison of asserted enumerations 16/4616/1
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Fri, 20 Nov 2020 10:25:48 +0000 (12:25 +0200)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Fri, 20 Nov 2020 10:25:48 +0000 (12:25 +0200)
gitlab #25

Change-Id: I3ddbf9ea2ece5830fbe1400196ec9d96bfd01e23

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

index d24509395633f7471114302a9815d2a66ed108eb..82320753c7a8eb81e8e1473b1b95954838e6d475 100644 (file)
@@ -1265,7 +1265,10 @@ public class GraphComparator {
                                                        }
                                                } else {
                                                        // Non literal properties.
-                                                       if (comparator.compare(g, s1.getObject(), s2.getObject()) != ResourceComparator.NO_MATCH) {
+                                                       int comp = comparator.compare(g, s1.getObject(), s2.getObject());
+                                                       if (comp == ResourceComparator.NO_MATCH) {
+                                                               addModification(r1,s1,r2,s2);
+                                                       } else if (comp != ResourceComparator.EXACT_MATCH) {
                                                                if (!s1.getObject().equals(s1.getSubject()) && !s2.getObject().equals(s2.getSubject())) {
                                                                        if (!a1 && !a2) {
                                                                                // compare props matches objects, so we can call that only for non asserted statements
@@ -1279,7 +1282,7 @@ public class GraphComparator {
                                                                        addModification(r1,s1,r2,s2);
                                                                }
                                                        } else {
-                                                               addModification(r1,s1,r2,s2);
+                                                               // Exact match, nothing to do.
                                                        }
                                                }
                                        } else {