From 046ea91b3adcb7d57965a45949543454a3511dca Mon Sep 17 00:00:00 2001 From: cepprice Date: Mon, 25 Jan 2021 19:17:55 +0500 Subject: [PATCH] Fix #10565 --- .../net/osmand/plus/osmedit/OpenstreetmapPoint.java | 10 +++++----- OsmAnd/src/net/osmand/plus/osmedit/OsmNotesPoint.java | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapPoint.java b/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapPoint.java index c2fb1ac98e..3a9757c8f6 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapPoint.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapPoint.java @@ -111,14 +111,14 @@ public class OpenstreetmapPoint extends OsmPoint { boolean res = this.getName() != null && this.getName().equals(otherPoint.getName()); LatLon thisLatLon = new LatLon(this.getLatitude(), this.getLongitude()); LatLon otherLatLon = new LatLon(otherPoint.getLatitude(), otherPoint.getLongitude()); - res = res || thisLatLon.equals(otherLatLon); + res = res && thisLatLon.equals(otherLatLon); if (getType() != null) - res = res || getType().equals(otherPoint.getType()); + res = res && getType().equals(otherPoint.getType()); if (getSubtype() != null) - res = res || getSubtype().equals(otherPoint.getSubtype()); + res = res && getSubtype().equals(otherPoint.getSubtype()); if (getTagsString() != null) - res = res || getTagsString().equals(otherPoint.getTagsString()); - res = res || getId() == otherPoint.getId(); + res = res && getTagsString().equals(otherPoint.getTagsString()); + res = res && getId() == otherPoint.getId(); return res; } diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmNotesPoint.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmNotesPoint.java index 9275143cec..d9faf7d51c 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmNotesPoint.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmNotesPoint.java @@ -79,7 +79,9 @@ public class OsmNotesPoint extends OsmPoint { LatLon thisPos = new LatLon(latitude, longitude); LatLon thatPos = new LatLon(that.latitude, that.longitude); boolean res = thisPos.equals(thatPos); - res = res || text != null && text.equals(that.text); + if (text != null) { + res = res && text.equals(that.text); + } return res; }