Changeset 12091 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r12064 r12091 1301 1301 public Collection<? extends OsmPrimitive> getPreservedPrimitives() { 1302 1302 DataSet ds = getLayerManager().getEditDataSet(); 1303 return ds != null ? ds.getSelected() : null;1303 return ds != null ? ds.getSelected() : Collections.emptySet(); 1304 1304 } 1305 1305 -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/DrawActionTest.java
r12023 r12091 4 4 import static org.junit.Assert.assertEquals; 5 5 import static org.junit.Assert.assertNotNull; 6 import static org.junit.Assert.assertNull; 6 7 import static org.junit.Assert.assertTrue; 7 8 … … 100 101 } 101 102 } 103 104 /** 105 * Non regression test case for bug #14762. 106 */ 107 @Test 108 public void testTicket14762() { 109 DrawAction action = new DrawAction(); 110 assertNull(action.getLayerManager().getEditDataSet()); 111 assertEquals(0, action.getPreservedPrimitives().size()); 112 } 102 113 }
Note:
See TracChangeset
for help on using the changeset viewer.