# HG changeset patch # User John Dean # Date 1266440347 28800 # Node ID 2856f9bc4ddffd606b58b5a96b7fc935c47b17c3 # Parent 1dc37cfc99cdf9c8d9cc85fca02d0c7727ddaacd Backed out changeset 1dc37cfc99cd diff -r 1dc37cfc99cd -r 2856f9bc4ddf 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 Wed Feb 17 12:57:24 2010 -0800 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java Wed Feb 17 12:59:07 2010 -0800 @@ -433,7 +433,7 @@ if (connectedServices != null) return new ArrayList(connectedServices); - return Collections.emptyList(); + return null; } private File getConnectionStorageFile() { diff -r 1dc37cfc99cd -r 2856f9bc4ddf connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ConnectionUIUtils.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ConnectionUIUtils.java Wed Feb 17 12:57:24 2010 -0800 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ConnectionUIUtils.java Wed Feb 17 12:59:07 2010 -0800 @@ -144,7 +144,7 @@ Collection connectedServices = Registry.instance().getConnectedServices(connection); // if any service is in-use, then connection is in-use - if (connectedServices.isEmpty()) + if (connectedServices == null) return null; for (IConnectedService connectedService : connectedServices) { diff -r 1dc37cfc99cd -r 2856f9bc4ddf connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/SettingsWizard.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/SettingsWizard.java Wed Feb 17 12:57:24 2010 -0800 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/SettingsWizard.java Wed Feb 17 12:59:07 2010 -0800 @@ -139,7 +139,7 @@ private void saveConnectedServicesEnabledState() { Collection connectedServices = Registry.instance().getConnectedServices(connectionToEdit); - if (connectedServices.isEmpty()) + if (connectedServices == null) return; if (savedEnabledStates == null) savedEnabledStates = new HashMap(); @@ -150,7 +150,7 @@ private void enableConnectedServices(boolean enabled) { Collection connectedServices = Registry.instance().getConnectedServices(connectionToEdit); - if (connectedServices.isEmpty() || savedEnabledStates == null) + if (connectedServices == null || savedEnabledStates == null) return; for (IConnectedService connectedService : connectedServices) { if (!enabled) // disable when asked diff -r 1dc37cfc99cd -r 2856f9bc4ddf debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/ConnectToDeviceDialog.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/ConnectToDeviceDialog.java Wed Feb 17 12:57:24 2010 -0800 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/ConnectToDeviceDialog.java Wed Feb 17 12:59:07 2010 -0800 @@ -196,9 +196,11 @@ if (connection != null) { IConnectedService connectedService = null; Collection services = manager.getConnectedServices(connection); - for (IConnectedService service : services) { - if (service != null && service.getService().getIdentifier().equals(data.getService().getIdentifier())) { - connectedService = service; + if (services != null) { + for (IConnectedService service : services) { + if (service != null && service.getService().getIdentifier().equals(data.getService().getIdentifier())) { + connectedService = service; + } } }