File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
closed/src/java.base/share/classes/openj9/internal/security Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ public final class RestrictedSecurity {
6868
6969 private static final boolean isNSSSupported ;
7070 private static final boolean isOpenJCEPlusSupported ;
71- private static boolean isOpenJCEPlusModuleExist ;
71+ private static final boolean isOpenJCEPlusModuleExist ;
7272
7373 private static final boolean userSetProfile ;
7474 private static final boolean shouldEnableSecurity ;
@@ -140,12 +140,9 @@ public String[] run() {
140140 isOpenJCEPlusSupported = isOsSupported && isArchSupported ;
141141
142142 // Check whether the OpenJCEPlus module exists.
143- isOpenJCEPlusModuleExist = false ;
144143 ModuleLayer layer = ModuleLayer .boot ();
145144 Optional <Module > module = layer .findModule ("openjceplus" );
146- if (module .isPresent ()) {
147- isOpenJCEPlusModuleExist = true ;
148- }
145+ isOpenJCEPlusModuleExist = module .isPresent ();
149146
150147 // Check the default solution to see if FIPS is supported.
151148 isFIPSSupported = isNSSSupported ;
@@ -397,7 +394,7 @@ private static void checkIfKnownProfileSupported() {
397394 + " on this platform." );
398395 }
399396
400- if (profileID .contains ("OpenJCEPlus" ) && ! isOpenJCEPlusModuleExist ) {
397+ if (! isOpenJCEPlusModuleExist && profileID .contains ("OpenJCEPlus" )) {
401398 printStackTraceAndExit ("FIPS 140-3 profile specified. Required OpenJCEPlus"
402399 + " module not found." );
403400 }
You can’t perform that action at this time.
0 commit comments