Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2007-04-20 22:29:49 +0000
committerslewis2007-04-20 22:29:49 +0000
commit04dfb9428863b6ba1cc8e8a7584bc7d451ace0a9 (patch)
treee6f7b421d7f1319c22536e1a8514245269f39abd /providers/bundles/org.eclipse.ecf.provider.jmdns
parent7ede54a73e30a6a9b573293885a3b5238a1ae662 (diff)
downloadorg.eclipse.ecf-04dfb9428863b6ba1cc8e8a7584bc7d451ace0a9.tar.gz
org.eclipse.ecf-04dfb9428863b6ba1cc8e8a7584bc7d451ace0a9.tar.xz
org.eclipse.ecf-04dfb9428863b6ba1cc8e8a7584bc7d451ace0a9.zip
Changes to have all activator classes return non-null with calls to getDefault(), even in non-OSGi environments
Diffstat (limited to 'providers/bundles/org.eclipse.ecf.provider.jmdns')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/internal/provider/jmdns/JMDNSPlugin.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/internal/provider/jmdns/JMDNSPlugin.java b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/internal/provider/jmdns/JMDNSPlugin.java
index 0bde05d68..b44d0b41e 100644
--- a/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/internal/provider/jmdns/JMDNSPlugin.java
+++ b/providers/bundles/org.eclipse.ecf.provider.jmdns/src/org/eclipse/ecf/internal/provider/jmdns/JMDNSPlugin.java
@@ -83,7 +83,10 @@ public class JMDNSPlugin implements BundleActivator {
/**
* Returns the shared instance.
*/
- public static JMDNSPlugin getDefault() {
+ public synchronized static JMDNSPlugin getDefault() {
+ if (plugin == null) {
+ plugin = new JMDNSPlugin();
+ }
return plugin;
}

Back to the top