Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2007-04-20 22:29:53 +0000
committerslewis2007-04-20 22:29:53 +0000
commit91bd6b7337b28021a3c57cedd6eec4b0a163497f (patch)
tree862bd91cb2754a2755aca58f7841eeb0f86dde59 /framework/bundles
parentc0dbf1580d27b95764eecbae12986bc2712732f2 (diff)
downloadorg.eclipse.ecf-91bd6b7337b28021a3c57cedd6eec4b0a163497f.tar.gz
org.eclipse.ecf-91bd6b7337b28021a3c57cedd6eec4b0a163497f.tar.xz
org.eclipse.ecf-91bd6b7337b28021a3c57cedd6eec4b0a163497f.zip
Changes to have all activator classes return non-null with calls to getDefault(), even in non-OSGi environments
Diffstat (limited to 'framework/bundles')
-rw-r--r--framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/internal/discovery/DiscoveryPlugin.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/internal/discovery/DiscoveryPlugin.java b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/internal/discovery/DiscoveryPlugin.java
index d71ae68d1..697bf4337 100644
--- a/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/internal/discovery/DiscoveryPlugin.java
+++ b/framework/bundles/org.eclipse.ecf.discovery/src/org/eclipse/ecf/internal/discovery/DiscoveryPlugin.java
@@ -43,7 +43,10 @@ public class DiscoveryPlugin implements BundleActivator {
/**
* Returns the shared instance.
*/
- public static DiscoveryPlugin getDefault() {
+ public synchronized static DiscoveryPlugin getDefault() {
+ if (plugin == null) {
+ plugin = new DiscoveryPlugin();
+ }
return plugin;
}

Back to the top