Changeset 2850 in josm for trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
- Timestamp:
- 2010-01-13T20:15:02+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
r2655 r2850 40 40 import org.openstreetmap.josm.gui.layer.Layer; 41 41 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 42 import org.openstreetmap.josm.tools.CheckParameterUtil; 42 43 43 44 /** … … 114 115 public HistoryBrowserModel(History history) { 115 116 this(); 116 if (history == null) 117 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "history")); 117 CheckParameterUtil.ensureParameterNotNull(history, "history"); 118 118 setHistory(history); 119 119 } … … 225 225 */ 226 226 public TagTableModel getTagTableModel(PointInTimeType pointInTimeType) throws IllegalArgumentException { 227 if (pointInTimeType == null) 228 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "pointInTimeType")); 227 CheckParameterUtil.ensureParameterNotNull(pointInTimeType, "pointInTimeType"); 229 228 if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME)) 230 229 return currentTagTableModel; … … 237 236 238 237 public NodeListTableModel getNodeListTableModel(PointInTimeType pointInTimeType) throws IllegalArgumentException { 239 if (pointInTimeType == null) 240 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "pointInTimeType")); 238 CheckParameterUtil.ensureParameterNotNull(pointInTimeType, "pointInTimeType"); 241 239 if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME)) 242 240 return currentNodeListTableModel; … … 249 247 250 248 public RelationMemberTableModel getRelationMemberTableModel(PointInTimeType pointInTimeType) throws IllegalArgumentException { 251 if (pointInTimeType == null) 252 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "pointInTimeType")); 249 CheckParameterUtil.ensureParameterNotNull(pointInTimeType, "pointInTimeType"); 253 250 if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME)) 254 251 return currentRelationMemberTableModel; … … 273 270 */ 274 271 public void setReferencePointInTime(HistoryOsmPrimitive reference) throws IllegalArgumentException, IllegalStateException{ 275 if (reference == null) 276 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "reference")); 272 CheckParameterUtil.ensureParameterNotNull(reference, "reference"); 277 273 if (history == null) 278 274 throw new IllegalStateException(tr("History not initialized yet. Failed to set reference primitive.")); … … 304 300 */ 305 301 public void setCurrentPointInTime(HistoryOsmPrimitive current) throws IllegalArgumentException, IllegalStateException{ 306 if (current == null) 307 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "current")); 302 CheckParameterUtil.ensureParameterNotNull(current, "current"); 308 303 if (history == null) 309 304 throw new IllegalStateException(tr("History not initialized yet. Failed to set current primitive.")); … … 347 342 */ 348 343 public HistoryOsmPrimitive getPointInTime(PointInTimeType type) throws IllegalArgumentException { 349 if (type == null) 350 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "type")); 344 CheckParameterUtil.ensureParameterNotNull(type, "type"); 351 345 if (type.equals(PointInTimeType.CURRENT_POINT_IN_TIME)) 352 346 return current;
Note:
See TracChangeset
for help on using the changeset viewer.