Changeset 16119 in josm for trunk/src/org/openstreetmap/josm/command/ChangeCommand.java
- Timestamp:
- 2020-03-14T13:26:33+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/ChangeCommand.java
r14283 r16119 32 32 * @param osm The existing primitive to modify. It must belong to a data set 33 33 * @param newOsm The new primitive 34 * @throws IllegalArgumentException if sanity checks fail 34 35 */ 35 36 public ChangeCommand(OsmPrimitive osm, OsmPrimitive newOsm) { … … 42 43 * @param osm The existing primitive to modify 43 44 * @param newOsm The new primitive 45 * @throws IllegalArgumentException if sanity checks fail 44 46 * @since 11240 45 47 */ … … 54 56 CheckParameterUtil.ensureParameterNotNull(osm, "osm"); 55 57 CheckParameterUtil.ensureParameterNotNull(newOsm, "newOsm"); 56 if (newOsm instanceof Way && ((Way) newOsm). getNodesCount() == 0) {58 if (newOsm instanceof Way && ((Way) newOsm).isEmpty()) { 57 59 // Do not allow to create empty ways (see #7465) 58 60 throw new IllegalArgumentException(tr("New way {0} has 0 nodes", newOsm));
Note:
See TracChangeset
for help on using the changeset viewer.