Changeset 14353 in josm


Ignore:
Timestamp:
2018-10-22T00:07:37+02:00 (7 weeks ago)
Author:
michael2402
Message:

Throw exception if NaN is encountered in Range.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/Range.java

    r12378 r14353  
    2525     */
    2626    public Range(double lower, double upper) {
    27         if (lower < 0 || lower >= upper)
     27        if (lower < 0 || lower >= upper || Double.isNaN(lower) || Double.isNaN(upper)) {
    2828            throw new IllegalArgumentException("Invalid range: "+lower+'-'+upper);
     29        }
    2930        this.lower = lower;
    3031        this.upper = upper;
Note: See TracChangeset for help on using the changeset viewer.