Changeset 13520 in josm for trunk/src/org


Ignore:
Timestamp:
2018-03-12T22:32:42+01:00 (6 years ago)
Author:
Don-vip
Message:

see #15560 - fix detection of Java version >= 10

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r13473 r13520  
    15751575    /**
    15761576     * Returns the Java version as an int value.
    1577      * @return the Java version as an int value (8, 9, etc.)
     1577     * @return the Java version as an int value (8, 9, 10, etc.)
    15781578     * @since 12130
    15791579     */
     
    15911591        int dashPos = version.indexOf('-');
    15921592        return Integer.parseInt(version.substring(0,
    1593                 dotPos > -1 ? dotPos : dashPos > -1 ? dashPos : 1));
     1593                dotPos > -1 ? dotPos : dashPos > -1 ? dashPos : version.length()));
    15941594    }
    15951595
Note: See TracChangeset for help on using the changeset viewer.