From Mon Sep 17 00:00:00 2001
From: Matt McCutchen <matt@mattmccutchen.net>
Date: Sat, 17 Oct 2026 11:10:14 -0400
fix #24956 - Way "modified" flag should be based on node IDs, not coordinates
Simple fix that changes Way.hasEqualSemanticAttributes to compare node
IDs. Concerns before committing:
- Does this break other use cases? Is a more complex fix needed?
- Add a unit test so someone doesn't change the code back without being
aware of #24956?
---
src/org/openstreetmap/josm/data/osm/Way.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/org/openstreetmap/josm/data/osm/Way.java b/src/org/openstreetmap/josm/data/osm/Way.java
index 85501abef5..1238da0451 100644
|
a
|
b
|
public final class Way extends OsmPrimitive implements IWay<Node> {
|
| 326 | 326 | if (getNodesCount() != w.getNodesCount()) return false; |
| 327 | 327 | if (!super.hasEqualSemanticAttributes(other, testInterestingTagsOnly)) |
| 328 | 328 | return false; |
| 329 | | return IntStream.range(0, getNodesCount()) |
| 330 | | .allMatch(i -> getNode(i).hasEqualSemanticAttributes(w.getNode(i))); |
| | 329 | return Arrays.equals(nodes, w.nodes); |
| 331 | 330 | } |
| 332 | 331 | |
| 333 | 332 | /** |