Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
r17584 r17587 650 650 return Collections.emptySet(); 651 651 } 652 if (keys.length == 1) {652 if (keys.length == 2) { 653 653 return Collections.singleton(keys[0]); 654 654 } … … 666 666 if (k == null) { 667 667 return Stream.empty(); 668 } else if (k.length == 1) {668 } else if (k.length == 2) { 669 669 return Stream.of(k[0]); 670 670 } else { -
trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveKeyHandlingTest.java
r17584 r17587 4 4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 5 import static org.junit.jupiter.api.Assertions.assertFalse; 6 import static org.junit.jupiter.api.Assertions.assertNotEquals; 6 7 import static org.junit.jupiter.api.Assertions.assertTrue; 7 8 … … 12 13 13 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 15 16 import java.util.Collections; 17 import java.util.HashSet; 14 18 15 19 /** … … 50 54 51 55 testGetKey(n, "akey", "avalue"); 56 assertEquals(Collections.singleton("akey"), n.keySet()); 57 assertNotEquals(HashSet.class, n.keySet().getClass()); // expect Collections.singleton 58 52 59 } 53 60
Note:
See TracChangeset
for help on using the changeset viewer.