Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/SimplePrimitiveId.java
r12190 r13969 133 133 } 134 134 for (long i = Long.parseLong(firstId); i <= lastIdParsed; i++) { 135 if (i > 0) { 136 ids.add(new SimplePrimitiveId(i, type)); 137 } 138 } 139 } else { 140 long i = Long.parseLong(firstId); 141 if (i > 0) { 135 142 ids.add(new SimplePrimitiveId(i, type)); 136 143 } 137 } else {138 ids.add(new SimplePrimitiveId(Long.parseLong(firstId), type));139 144 } 140 145 return ids; -
trunk/src/org/openstreetmap/josm/gui/widgets/OsmIdTextField.java
r13849 r13969 129 129 } 130 130 } 131 return true;131 return !ids.isEmpty(); 132 132 } 133 133 } -
trunk/test/unit/org/openstreetmap/josm/data/osm/SimplePrimitiveIdTest.java
r11104 r13969 63 63 assertEquals("[relation 123, relation 124, way 345, way 346, node 789]", 64 64 SimplePrimitiveId.fuzzyParse("foo relation/123-24 and way/345-346 but also node/789").toString()); 65 assertEquals("[]", 66 SimplePrimitiveId.fuzzyParse("foo relation/0 bar").toString()); 65 67 } 66 68 … … 93 95 assertEquals("[node 234, node 235]", SimplePrimitiveId.multipleFromString("node/234-235").toString()); 94 96 assertEquals("[node 998, node 999, node 1000, node 1001]", SimplePrimitiveId.multipleFromString("node/998-1001").toString()); 97 assertEquals("[]", SimplePrimitiveId.multipleFromString("node/0").toString()); 95 98 } 96 99
Note:
See TracChangeset
for help on using the changeset viewer.