aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStoyan Boshev2012-01-10 09:04:50 (EST)
committerStoyan Boshev2012-01-10 09:04:50 (EST)
commitbc90cc9f25f594afb11c27b3a37a56b82e3793a3 (patch)
tree7a8ee32c0db4c005bcf53a8efa5d7e1aa0cad374
parent6c0ac46a5c1824eef44ae09d3c2d35a791e5d21e (diff)
downloadrt.equinox.bundles-bc90cc9f25f594afb11c27b3a37a56b82e3793a3.zip
rt.equinox.bundles-bc90cc9f25f594afb11c27b3a37a56b82e3793a3.tar.gz
rt.equinox.bundles-bc90cc9f25f594afb11c27b3a37a56b82e3793a3.tar.bz2
BundleListener is registered after SCRManager initialization is
complete. This avoids possible NPE when SCR starts.
-rw-r--r--bundles/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/SCRManager.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/bundles/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/SCRManager.java b/bundles/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/SCRManager.java
index df69386..2a66437 100644
--- a/bundles/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/SCRManager.java
+++ b/bundles/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/SCRManager.java
@@ -82,10 +82,6 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
if (Activator.startup)
Activator.timeLog("resolver.synchronizeServiceReferences() method took "); //$NON-NLS-1$
- Activator.bc.addBundleListener(this);
- if (Activator.startup)
- Activator.timeLog("addBundleListener() method took "); //$NON-NLS-1$
-
String storageClass = Activator.bc.getProperty("scr.storage.class"); //$NON-NLS-1$
if (storageClass == null) {
storageClass = "org.eclipse.equinox.internal.ds.storage.file.FileStorage"; //$NON-NLS-1$
@@ -95,6 +91,10 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
} catch (Exception e) {
Activator.log(null, LogService.LOG_ERROR, NLS.bind(Messages.COULD_NOT_CREATE_INSTANCE, storageClass), e);
}
+ if (Activator.startup)
+ Activator.timeLog("Creating storage took "); //$NON-NLS-1$
+
+ Activator.bc.addBundleListener(this);
}
public void startIt() {