- Timestamp:
- 2018-02-26T20:03:44+01:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
r13467 r13468 708 708 Matcher m = Pattern.compile("(\\d+)\\.(\\d+)(\\.\\d+.*)?").matcher(version); 709 709 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)); 712 712 return (maj == 4 && min >= 5) || maj > 4; 713 713 } … … 726 726 public static int getPowerShellVersion() { 727 727 try { 728 return Integer. valueOf(Utils.execOutput(Arrays.asList(728 return Integer.parseInt(Utils.execOutput(Arrays.asList( 729 729 "powershell", "-Command", "$PSVersionTable.PSVersion.Major"), 2, TimeUnit.SECONDS)); 730 730 } catch (NumberFormatException | IOException | ExecutionException | InterruptedException e) { -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r13467 r13468 869 869 } 870 870 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) { 875 872 throw new ExecutionException(msg, null); 876 873 }
Note:
See TracChangeset
for help on using the changeset viewer.