From: Jussi Koskela Date: Tue, 14 Apr 2020 07:46:57 +0000 (+0300) Subject: Take rounding field into account in equals and in hashCode X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F37%2F4137%2F1;p=simantics%2Fplatform.git Take rounding field into account in equals and in hashCode gitlab #518 Change-Id: If96bc1da15494a6041473ee919a074bf997e2455 --- diff --git a/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/BasicConnectionStyle.java b/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/BasicConnectionStyle.java index 301cfdf09..2f218d8fa 100644 --- a/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/BasicConnectionStyle.java +++ b/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/BasicConnectionStyle.java @@ -218,6 +218,8 @@ public class BasicConnectionStyle implements ConnectionStyle, Serializable { result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + ((lineColor == null) ? 0 : lineColor.hashCode()); result = prime * result + ((lineStroke == null) ? 0 : lineStroke.hashCode()); + temp = Double.doubleToLongBits(rounding); + result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + ((routeLineStroke == null) ? 0 : routeLineStroke.hashCode()); return result; } @@ -250,6 +252,8 @@ public class BasicConnectionStyle implements ConnectionStyle, Serializable { return false; } else if (!lineStroke.equals(other.lineStroke)) return false; + if (Double.doubleToLongBits(rounding) != Double.doubleToLongBits(other.rounding)) + return false; if (routeLineStroke == null) { if (other.routeLineStroke != null) return false;