Ignore:
Timestamp:
2014-12-20T22:43:20+01:00 (9 years ago)
Author:
Don-vip
Message:

global cleanup of IllegalArgumentExceptions thrown by JOSM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java

    r7025 r7864  
    4343
    4444import org.openstreetmap.josm.Main;
     45import org.openstreetmap.josm.tools.CheckParameterUtil;
    4546import org.openstreetmap.josm.tools.Utils;
    4647
     
    828829     */
    829830    public List<Divider> dividersThatOverlap(Rectangle r) {
    830         if (r == null)
    831             throw new IllegalArgumentException("null Rectangle");
     831        CheckParameterUtil.ensureParameterNotNull(r, "r");
    832832        return dividersThatOverlap(getModel(), r);
    833833    }
     
    886886         */
    887887        public void setBounds(Rectangle bounds) {
    888             if (bounds == null)
    889                 throw new IllegalArgumentException("null bounds");
     888            CheckParameterUtil.ensureParameterNotNull(bounds, "bounds");
    890889            this.bounds = new Rectangle(bounds);
    891890        }
     
    10771076         */
    10781077        public Leaf(String name) {
    1079             if (name == null)
    1080                 throw new IllegalArgumentException("name is null");
     1078            CheckParameterUtil.ensureParameterNotNull(name, "name");
    10811079            this.name = name;
    10821080        }
     
    10971095         */
    10981096        public void setName(String name) {
    1099             if (name == null)
    1100                 throw new IllegalArgumentException("name is null");
     1097            CheckParameterUtil.ensureParameterNotNull(name, "name");
    11011098            this.name = name;
    11021099        }
Note: See TracChangeset for help on using the changeset viewer.