Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2007-04-20 22:30:11 +0000
committerslewis2007-04-20 22:30:11 +0000
commitbbdbe63f5aacab887ee9d28627a5dc1e1915cfb4 (patch)
treef06cd11863e3b086c6cd31276e0cc97179e79507
parent8672e7dccaf56e85c71d51c7020bb65b6365e598 (diff)
downloadorg.eclipse.ecf-bbdbe63f5aacab887ee9d28627a5dc1e1915cfb4.tar.gz
org.eclipse.ecf-bbdbe63f5aacab887ee9d28627a5dc1e1915cfb4.tar.xz
org.eclipse.ecf-bbdbe63f5aacab887ee9d28627a5dc1e1915cfb4.zip
Changes to have all activator classes return non-null with calls to getDefault(), even in non-OSGi environments
-rw-r--r--server-side/bundles/org.eclipse.ecf.server/src/org/eclipse/ecf/internal/server/Activator.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/server-side/bundles/org.eclipse.ecf.server/src/org/eclipse/ecf/internal/server/Activator.java b/server-side/bundles/org.eclipse.ecf.server/src/org/eclipse/ecf/internal/server/Activator.java
index d0c624fc8..f443f3a50 100644
--- a/server-side/bundles/org.eclipse.ecf.server/src/org/eclipse/ecf/internal/server/Activator.java
+++ b/server-side/bundles/org.eclipse.ecf.server/src/org/eclipse/ecf/internal/server/Activator.java
@@ -47,7 +47,10 @@ public class Activator implements BundleActivator {
*
* @return the shared instance.
*/
- public static Activator getDefault() {
+ public synchronized static Activator getDefault() {
+ if (plugin == null) {
+ plugin = new Activator();
+ }
return plugin;
}

Back to the top