Changeset 12200 in josm


Ignore:
Timestamp:
2017-05-17T03:09:32+02:00 (3 months ago)
Author:
Don-vip
Message:

fix #14811 - NPE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/Capabilities.java

    r11523 r12200  
    153153     */
    154154    public boolean supportsVersion(String version) {
    155         return get("version", "minimum").compareTo(version) <= 0
    156             && get("version", "maximum").compareTo(version) >= 0;
     155        String min = get("version", "minimum");
     156        String max = get("version", "maximum");
     157        return min != null && max != null
     158            && min.compareTo(version) <= 0
     159            && max.compareTo(version) >= 0;
    157160    }
    158161
Note: See TracChangeset for help on using the changeset viewer.