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/src/org/openstreetmap/josm/data/osm/Way.java
+++ b/src/org/openstreetmap/josm/data/osm/Way.java
@@ -326,8 +326,7 @@ public final class Way extends OsmPrimitive implements IWay<Node> {
         if (getNodesCount() != w.getNodesCount()) return false;
         if (!super.hasEqualSemanticAttributes(other, testInterestingTagsOnly))
             return false;
-        return IntStream.range(0, getNodesCount())
-                .allMatch(i -> getNode(i).hasEqualSemanticAttributes(w.getNode(i)));
+        return Arrays.equals(nodes, w.nodes);
     }
 
     /**
