Fix #10565
This commit is contained in:
parent
92217cba9f
commit
046ea91b3a
2 changed files with 8 additions and 6 deletions
|
@ -111,14 +111,14 @@ public class OpenstreetmapPoint extends OsmPoint {
|
||||||
boolean res = this.getName() != null && this.getName().equals(otherPoint.getName());
|
boolean res = this.getName() != null && this.getName().equals(otherPoint.getName());
|
||||||
LatLon thisLatLon = new LatLon(this.getLatitude(), this.getLongitude());
|
LatLon thisLatLon = new LatLon(this.getLatitude(), this.getLongitude());
|
||||||
LatLon otherLatLon = new LatLon(otherPoint.getLatitude(), otherPoint.getLongitude());
|
LatLon otherLatLon = new LatLon(otherPoint.getLatitude(), otherPoint.getLongitude());
|
||||||
res = res || thisLatLon.equals(otherLatLon);
|
res = res && thisLatLon.equals(otherLatLon);
|
||||||
if (getType() != null)
|
if (getType() != null)
|
||||||
res = res || getType().equals(otherPoint.getType());
|
res = res && getType().equals(otherPoint.getType());
|
||||||
if (getSubtype() != null)
|
if (getSubtype() != null)
|
||||||
res = res || getSubtype().equals(otherPoint.getSubtype());
|
res = res && getSubtype().equals(otherPoint.getSubtype());
|
||||||
if (getTagsString() != null)
|
if (getTagsString() != null)
|
||||||
res = res || getTagsString().equals(otherPoint.getTagsString());
|
res = res && getTagsString().equals(otherPoint.getTagsString());
|
||||||
res = res || getId() == otherPoint.getId();
|
res = res && getId() == otherPoint.getId();
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,9 @@ public class OsmNotesPoint extends OsmPoint {
|
||||||
LatLon thisPos = new LatLon(latitude, longitude);
|
LatLon thisPos = new LatLon(latitude, longitude);
|
||||||
LatLon thatPos = new LatLon(that.latitude, that.longitude);
|
LatLon thatPos = new LatLon(that.latitude, that.longitude);
|
||||||
boolean res = thisPos.equals(thatPos);
|
boolean res = thisPos.equals(thatPos);
|
||||||
res = res || text != null && text.equals(that.text);
|
if (text != null) {
|
||||||
|
res = res && text.equals(that.text);
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue