Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2013-02-22 15:20:14 +0000
committerThomas Watson2013-02-22 15:20:14 +0000
commit8596e4db6ab3ce5bbc1d8162ec0f948aa37d14f2 (patch)
treefe431752a27accfffc7d5b6dbc8b47e4226f0032 /bundles/org.eclipse.osgi/supplement/src
parente76936ee02a1f51e52308f2a34a00e941d2362b3 (diff)
downloadrt.equinox.framework-8596e4db6ab3ce5bbc1d8162ec0f948aa37d14f2.tar.gz
rt.equinox.framework-8596e4db6ab3ce5bbc1d8162ec0f948aa37d14f2.tar.xz
rt.equinox.framework-8596e4db6ab3ce5bbc1d8162ec0f948aa37d14f2.zip
Protect code from lazy activation and resuming bundles security checks.
Diffstat (limited to 'bundles/org.eclipse.osgi/supplement/src')
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/util/SecureAction.java20
1 files changed, 6 insertions, 14 deletions
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/util/SecureAction.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/util/SecureAction.java
index 7db659307..562738f73 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/util/SecureAction.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/util/SecureAction.java
@@ -16,6 +16,7 @@ import java.net.*;
import java.security.*;
import java.util.zip.ZipException;
import java.util.zip.ZipFile;
+import org.eclipse.osgi.container.Module;
import org.osgi.framework.*;
import org.osgi.util.tracker.ServiceTracker;
@@ -405,20 +406,20 @@ public class SecureAction {
}
/**
- * Starts a bundle.
- * @param bundle the bundle to start
+ * Starts a module.
+ * @param module the module to start
* @param options the start options
* @throws BundleException
*/
- public void start(final Bundle bundle, final int options) throws BundleException {
+ public void start(final Module module, final Module.StartOptions... options) throws BundleException {
if (System.getSecurityManager() == null) {
- bundle.start(options);
+ module.start(options);
return;
}
try {
AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
public Object run() throws BundleException {
- bundle.start(options);
+ module.start(options);
return null;
}
}, controlContext);
@@ -430,15 +431,6 @@ public class SecureAction {
}
}
- /**
- * Starts a bundle
- * @param bundle
- * @throws BundleException
- */
- public void start(final Bundle bundle) throws BundleException {
- start(bundle, 0);
- }
-
public BundleContext getContext(final Bundle bundle) {
if (System.getSecurityManager() == null) {
return bundle.getBundleContext();

Back to the top