8267587: Update java.util to use enhanced switch

Reviewed-by: iris
This commit is contained in:
Tagir F. Valeev 2021-05-31 08:48:38 +00:00
parent 35916ed57f
commit ab5a7ff230
15 changed files with 556 additions and 776 deletions

View file

@ -190,19 +190,18 @@ public class JarFile extends ZipFile {
String enableMultiRelease = GetPropertyAction
.privilegedGetProperty("jdk.util.jar.enableMultiRelease", "true");
switch (enableMultiRelease) {
case "true":
default:
MULTI_RELEASE_ENABLED = true;
MULTI_RELEASE_FORCED = false;
break;
case "false":
case "false" -> {
MULTI_RELEASE_ENABLED = false;
MULTI_RELEASE_FORCED = false;
break;
case "force":
}
case "force" -> {
MULTI_RELEASE_ENABLED = true;
MULTI_RELEASE_FORCED = true;
break;
}
default -> {
MULTI_RELEASE_ENABLED = true;
MULTI_RELEASE_FORCED = false;
}
}
}