We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 184573a commit 0e734bdCopy full SHA for 0e734bd
lib/src/main/java/com/diffplug/spotless/Jvm.java
@@ -242,7 +242,7 @@ public int compare(V version0, V version1) {
242
243
private static <V> int[] convert(V versionObject) {
244
try {
245
- return Arrays.asList(versionObject.toString().split("\\.")).stream().mapToInt(s -> Integer.valueOf(s)).toArray();
+ return Arrays.asList(versionObject.toString().split("\\.")).stream().mapToInt(Integer::parseInt).toArray();
246
} catch (Exception e) {
247
throw new IllegalArgumentException(String.format("Not a semantic version: %s", versionObject), e);
248
}
0 commit comments