Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2007-04-20 22:29:45 +0000
committerslewis2007-04-20 22:29:45 +0000
commit81024b2500ce2c69d646de616a56bcd060cf0ccf (patch)
treef90cadacdb96bba8667391fdae26a89bf13c4d4f
parentcefc554e99d42ad0afb09c0d7d26517fc5d67760 (diff)
downloadorg.eclipse.ecf-81024b2500ce2c69d646de616a56bcd060cf0ccf.tar.gz
org.eclipse.ecf-81024b2500ce2c69d646de616a56bcd060cf0ccf.tar.xz
org.eclipse.ecf-81024b2500ce2c69d646de616a56bcd060cf0ccf.zip
Changes to have all activator classes return non-null with calls to getDefault(), even in non-OSGi environments
-rw-r--r--framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/internal/provider/ProviderPlugin.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/internal/provider/ProviderPlugin.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/internal/provider/ProviderPlugin.java
index 657c74b67..6e7656c66 100644
--- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/internal/provider/ProviderPlugin.java
+++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/internal/provider/ProviderPlugin.java
@@ -106,7 +106,10 @@ public class ProviderPlugin implements BundleActivator {
/**
* Returns the shared instance.
*/
- public static ProviderPlugin getDefault() {
+ public synchronized static ProviderPlugin getDefault() {
+ if (plugin == null) {
+ plugin = new ProviderPlugin();
+ }
return plugin;
}

Back to the top