Clearer logic in checking testing version validity

This commit is contained in:
Jason Tedor 2015-08-22 09:27:56 -04:00
parent 980f49b566
commit 0407782baa
1 changed files with 1 additions and 4 deletions

View File

@ -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"));