Ignore:
Timestamp:
2010-01-13T20:15:02+01:00 (14 years ago)
Author:
mjulius
Message:

fix messages for gui

File:
1 edited

Legend:

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

    r2655 r2850  
    4040import org.openstreetmap.josm.gui.layer.Layer;
    4141import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     42import org.openstreetmap.josm.tools.CheckParameterUtil;
    4243
    4344/**
     
    114115    public HistoryBrowserModel(History history) {
    115116        this();
    116         if (history == null)
    117             throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "history"));
     117        CheckParameterUtil.ensureParameterNotNull(history, "history");
    118118        setHistory(history);
    119119    }
     
    225225     */
    226226    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");
    229228        if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME))
    230229            return currentTagTableModel;
     
    237236
    238237    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");
    241239        if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME))
    242240            return currentNodeListTableModel;
     
    249247
    250248    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");
    253250        if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME))
    254251            return currentRelationMemberTableModel;
     
    273270     */
    274271    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");
    277273        if (history == null)
    278274            throw new IllegalStateException(tr("History not initialized yet. Failed to set reference primitive."));
     
    304300     */
    305301    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");
    308303        if (history == null)
    309304            throw new IllegalStateException(tr("History not initialized yet. Failed to set current primitive."));
     
    347342     */
    348343    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");
    351345        if (type.equals(PointInTimeType.CURRENT_POINT_IN_TIME))
    352346            return current;
Note: See TracChangeset for help on using the changeset viewer.