Use ternary expression.

This commit is contained in:
Gary Gregory 2022-03-08 10:30:39 -05:00
parent 07b78ca38d
commit 38285a15f5
1 changed files with 1 additions and 4 deletions

View File

@ -303,10 +303,7 @@ public enum JavaVersion {
*/
private static float maxVersion() {
final float v = toFloatVersion(System.getProperty("java.specification.version", "99.0"));
if (v > 0) {
return v;
}
return 99f;
return v > 0 ? v : 99f;
}
/**