Clearer logic in checking testing version validity
This commit is contained in:
parent
980f49b566
commit
0407782baa
|
@ -54,10 +54,7 @@ class JavaVersion implements Comparable<JavaVersion> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isValid(String value) {
|
public static boolean isValid(String value) {
|
||||||
if (!value.matches("^0*[0-9]+(\\.[0-9]+)*$")) {
|
return value.matches("^0*[0-9]+(\\.[0-9]+)*$");
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private final static JavaVersion CURRENT = parse(System.getProperty("java.specification.version"));
|
private final static JavaVersion CURRENT = parse(System.getProperty("java.specification.version"));
|
||||||
|
|
Loading…
Reference in New Issue