diff options
author | slewis | 2007-04-20 22:29:53 +0000 |
---|---|---|
committer | slewis | 2007-04-20 22:29:53 +0000 |
commit | 91bd6b7337b28021a3c57cedd6eec4b0a163497f (patch) | |
tree | 862bd91cb2754a2755aca58f7841eeb0f86dde59 /framework/bundles | |
parent | c0dbf1580d27b95764eecbae12986bc2712732f2 (diff) | |
download | org.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.java | 5 |
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; } |