# HG changeset patch # User Ed Swartz # Date 1261151633 21600 # Node ID ff775c1d2316a2e13471210338be920d4ec7ecea # Parent d320a6d36298b9660f44712de307373f6a4454a7 Fix connection listeners bug diff -r d320a6d36298 -r ff775c1d2316 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java Fri Dec 18 09:34:19 2009 -0600 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java Fri Dec 18 09:53:53 2009 -0600 @@ -72,7 +72,7 @@ private static final String CONNECTION_DATA_XML = "connectionData.xml"; //$NON-NLS-1$ private static final String NAME_SUFFIX_PATTERN = "(.+) \\((\\d+)\\)"; //$NON-NLS-1$ private static final String NAME_FMT = "{0} ({1})"; //$NON-NLS-1$ - private static Registry instance; + private static Registry instance = new Registry(); private List extensionFilters; private Map connectionTypeIdMap; @@ -85,10 +85,6 @@ private IConnection defaultConnection; public static Registry instance() { - if (instance == null) { - instance = new Registry(); - } - return instance; } @@ -480,7 +476,7 @@ } private void fireConnectionAdded(IConnection connection) { - if (listeners == null) + if (connectionListeners == null) return; for (IConnectionListener listener : connectionListeners) { listener.connectionAdded(connection); @@ -488,7 +484,7 @@ } private void fireConnectionRemoved(IConnection connection) { - if (listeners == null) + if (connectionListeners == null) return; for (IConnectionListener listener : connectionListeners) { listener.connectionRemoved(connection); @@ -496,7 +492,7 @@ } private void fireDefaultConnectionSet(IConnection connection) { - if (listeners == null) + if (connectionListeners == null) return; for (IConnectionListener listener : connectionListeners) { listener.defaultConnectionSet(connection);