Changeset 13468 in josm for trunk/src/org


Ignore:
Timestamp:
2018-02-26T20:03:44+01:00 (6 years ago)
Author:
Don-vip
Message:

fix #15992 - fix codestyle issues

Location:
trunk/src/org/openstreetmap/josm/tools
Files:
2 edited

Legend:

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

    r13467 r13468  
    708708                Matcher m = Pattern.compile("(\\d+)\\.(\\d+)(\\.\\d+.*)?").matcher(version);
    709709                if (m.matches()) {
    710                     int maj = Integer.valueOf(m.group(1));
    711                     int min = Integer.valueOf(m.group(2));
     710                    int maj = Integer.parseInt(m.group(1));
     711                    int min = Integer.parseInt(m.group(2));
    712712                    return (maj == 4 && min >= 5) || maj > 4;
    713713                }
     
    726726    public static int getPowerShellVersion() {
    727727        try {
    728             return Integer.valueOf(Utils.execOutput(Arrays.asList(
     728            return Integer.parseInt(Utils.execOutput(Arrays.asList(
    729729                    "powershell", "-Command", "$PSVersionTable.PSVersion.Major"), 2, TimeUnit.SECONDS));
    730730        } catch (NumberFormatException | IOException | ExecutionException | InterruptedException e) {
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r13467 r13468  
    869869            }
    870870            String msg = all != null ? all.toString() : null;
    871             if (!p.waitFor(timeout, unit)) {
    872                 throw new ExecutionException(msg, null);
    873             }
    874             if (p.exitValue() != 0) {
     871            if (!p.waitFor(timeout, unit) || p.exitValue() != 0) {
    875872                throw new ExecutionException(msg, null);
    876873            }
Note: See TracChangeset for help on using the changeset viewer.