Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2021-07-12 15:21:03 +0000
committerThomas Watson2021-07-12 16:21:21 +0000
commitc9abe2161dd06e880bb655e000ea12e89b5b0602 (patch)
treebf68e9f4db9aab801de5cd6f45c03b7bdce01d56
parent9321f287e8675227917bbb9ffdff3e24d8986e58 (diff)
downloadrt.equinox.framework-c9abe2161dd06e880bb655e000ea12e89b5b0602.tar.gz
rt.equinox.framework-c9abe2161dd06e880bb655e000ea12e89b5b0602.tar.xz
rt.equinox.framework-c9abe2161dd06e880bb655e000ea12e89b5b0602.zip
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>
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/SystemBundleActivator.java4
1 files changed, 3 insertions, 1 deletions
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 a8ac8f2c1..4db708a4f 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 @@ public class SystemBundleActivator implements BundleActivator {
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$

Back to the top