From c2a5b7657db18e6de715f9559ddc4335b953f203 Mon Sep 17 00:00:00 2001 From: Marko Luukkainen Date: Mon, 13 Jan 2020 11:22:50 +0200 Subject: [PATCH] Improve PropertyChange.equals for asserted properties. gitlab #10 Change-Id: I5ab2954f2cbcb0eb1b2a1bb116c0611ad7457298 --- .../simantics/interop/update/model/PropertyChange.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/org.simantics.interop.update/src/org/simantics/interop/update/model/PropertyChange.java b/org.simantics.interop.update/src/org/simantics/interop/update/model/PropertyChange.java index 5220736..de28055 100644 --- a/org.simantics.interop.update/src/org/simantics/interop/update/model/PropertyChange.java +++ b/org.simantics.interop.update/src/org/simantics/interop/update/model/PropertyChange.java @@ -81,7 +81,15 @@ public class PropertyChange { if (obj.getClass() != this.getClass()) return false; PropertyChange c = (PropertyChange)obj; - return pair.equals(c.pair); + if (!leftSubject.equals(c.leftSubject)) + return false; + if (!rightSubject.equals(c.rightSubject)) + return false; + if (pair.first != null && pair.first.equals(c.pair.first)) + return true; + if (pair.second != null && pair.second.equals(c.pair.second)) + return true; + return false; } public void apply(WriteGraph graph) throws DatabaseException { -- 2.47.1