Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/SelectCommand.java
r13173 r15324 35 35 if (newSelection == null || newSelection.isEmpty()) { 36 36 this.newSelection = Collections.emptySet(); 37 } else if (newSelection.contains(null)) { 38 throw new IllegalArgumentException("null primitive in selection"); 37 39 } else { 38 40 this.newSelection = new HashSet<>(newSelection); -
trunk/test/unit/org/openstreetmap/josm/command/SelectCommandTest.java
r13616 r15324 161 161 .verify(); 162 162 } 163 164 /** 165 * Unit test of {@link SelectCommand#SelectCommand}. 166 */ 167 @Test(expected = IllegalArgumentException.class) 168 public void testConstructorIAE() { 169 new SelectCommand(new DataSet(), Arrays.asList(new OsmPrimitive[] {null})); 170 } 163 171 }
Note:
See TracChangeset
for help on using the changeset viewer.