Index: trunk/test/unit/org/openstreetmap/josm/data/validation/tests/ConnectivityRelationsTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/tests/ConnectivityRelationsTest.java	(revision 19571)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/tests/ConnectivityRelationsTest.java	(revision 19580)
@@ -3,4 +3,5 @@
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import org.junit.jupiter.api.BeforeEach;
@@ -9,4 +10,5 @@
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.Node;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.data.osm.RelationMember;
@@ -100,3 +102,28 @@
         assertEquals(++expectedFailures, check.getErrors().size());
     }
+
+    /**
+     * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/201821">Bug #20182</a>.
+     */
+    @Test
+    void testTicket24368() {
+        Relation relation = createDefaultTestRelation();
+        check.visit(relation);
+
+        assertEquals(0, check.getErrors().size());
+
+        // change lanes for one way to an invalid value as reported in the ticket
+        boolean changed = false;
+        for (OsmPrimitive m : relation.getChildren()) {
+            if ("4".equals(m.get("lanes"))) {
+                m.put("lanes", "25 mph");
+                changed = true;
+                break;
+            }
+        }
+        assertTrue(changed);
+        check.visit(relation);
+        assertEquals(0, check.getErrors().size());
+
+    }
 }
