Ignore:
Timestamp:
2017-09-03T12:32:11+02:00 (21 months ago)
Author:
bastiK
Message:

see #15229 - remove dependencies of CheckParameterUtil on various data classes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java

    r12634 r12713  
    8181     */
    8282    public HistoryLoadTask add(PrimitiveId pid) {
    83         CheckParameterUtil.ensureValidPrimitiveId(pid, "pid");
     83        CheckParameterUtil.ensure(pid, "pid", "pid > 0", id -> id.getUniqueId() > 0);
    8484        toLoad.add(pid);
    8585        return this;
     
    119119     */
    120120    public HistoryLoadTask add(OsmPrimitive primitive) {
    121         CheckParameterUtil.ensureValidPrimitiveId(primitive, "primitive");
     121        CheckParameterUtil.ensure(primitive, "primitive", "id > 0", prim -> prim.getUniqueId() > 0);
    122122        return add(primitive.getPrimitiveId());
    123123    }
Note: See TracChangeset for help on using the changeset viewer.