File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
jcl/src/java.base/share/classes/java/lang Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -1188,18 +1188,21 @@ static void checkTmpDir() {
1188
1188
1189
1189
static void initSecurityManager (ClassLoader applicationClassLoader ) {
1190
1190
String javaSecurityManager = internalGetProperties ().getProperty ("java.security.manager" ); //$NON-NLS-1$
1191
- /*[IF JAVA_SPEC_VERSION > 11]*/
1192
- if ("allow" .equals (javaSecurityManager )) {
1193
- /* Do nothing. */
1194
- } else if ("disallow" .equals (javaSecurityManager ) //$NON-NLS-1$
1191
+ if (null == javaSecurityManager ) {
1195
1192
/*[IF JAVA_SPEC_VERSION >= 18]*/
1196
- || (null == javaSecurityManager )
1193
+ throwUOEFromSetSM = true ;
1194
+ /*[ELSE] JAVA_SPEC_VERSION >= 18 */
1195
+ /* Do nothing. */
1197
1196
/*[ENDIF] JAVA_SPEC_VERSION >= 18 */
1198
- ) {
1197
+ } else if ("allow" .equals (javaSecurityManager )) { //$NON-NLS-1$
1198
+ /* Do nothing. */
1199
+ } else if ("disallow" .equals (javaSecurityManager )) { //$NON-NLS-1$
1200
+ /*[IF JAVA_SPEC_VERSION > 11]*/
1199
1201
throwUOEFromSetSM = true ;
1200
- } else
1201
- /*[ENDIF] JAVA_SPEC_VERSION > 11 */
1202
- if (null != javaSecurityManager ) {
1202
+ /*[ELSE] JAVA_SPEC_VERSION > 11 */
1203
+ /* Do nothing. */
1204
+ /*[ENDIF] JAVA_SPEC_VERSION > 11 */
1205
+ } else {
1203
1206
/*[IF JAVA_SPEC_VERSION >= 17]*/
1204
1207
initialErr .println ("WARNING: A command line option has enabled the Security Manager" ); //$NON-NLS-1$
1205
1208
initialErr .println ("WARNING: The Security Manager is deprecated and will be removed in a future release" ); //$NON-NLS-1$
You can’t perform that action at this time.
0 commit comments