commit | c9abe2161dd06e880bb655e000ea12e89b5b0602 | [log] [tgz] |
---|---|---|
author | Thomas Watson <tjwatson@us.ibm.com> | Mon Jul 12 10:21:03 2021 -0500 |
committer | Thomas Watson <tjwatson@us.ibm.com> | Mon Jul 12 12:21:21 2021 -0400 |
tree | bf68e9f4db9aab801de5cd6f45c03b7bdce01d56 | |
parent | 9321f287e8675227917bbb9ffdff3e24d8986e58 [diff] |
Bug 574729 - avoid calling System::setSecurityManager with null Change-Id: I22b97871a6348c76ee48a380bf48670dd81aa9b4 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/182992 Tested-by: Equinox Bot <equinox-bot@eclipse.org>
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/SystemBundleActivator.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/SystemBundleActivator.java index a8ac8f2..4db708a 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/SystemBundleActivator.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/SystemBundleActivator.java
@@ -176,7 +176,9 @@ if (configuration.getDebug().DEBUG_SECURITY) Debug.println("Setting SecurityManager to: " + toInstall); //$NON-NLS-1$ try { - System.setSecurityManager(toInstall); + if (toInstall != null) { + System.setSecurityManager(toInstall); + } } catch (UnsupportedOperationException e) { throw new UnsupportedOperationException( "Setting the security manager is not allowed. The java.security.manager=allow java property must be set.", //$NON-NLS-1$