# HG changeset patch # User John Dean # Date 1266439921 28800 # Node ID a514fb7b20325906dcc31cd52a8e2c59e1e2584e # Parent 7876696931666e7678018f69657e3e39b84d8a69# Parent e3db0fe33733f68dace8c791ebdeaaa161da6a08 Merging heads diff -r e3db0fe33733 -r a514fb7b2032 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 11:50:08 2010 -0600 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java Wed Feb 17 12:52:01 2010 -0800 @@ -433,7 +433,7 @@ if (connectedServices != null) return new ArrayList(connectedServices); - return null; + return Collections.emptyList(); } private File getConnectionStorageFile() { diff -r e3db0fe33733 -r a514fb7b2032 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 11:50:08 2010 -0600 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ConnectionUIUtils.java Wed Feb 17 12:52:01 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 == null) + if (connectedServices.isEmpty()) return null; for (IConnectedService connectedService : connectedServices) { diff -r e3db0fe33733 -r a514fb7b2032 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 11:50:08 2010 -0600 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/SettingsWizard.java Wed Feb 17 12:52:01 2010 -0800 @@ -139,7 +139,7 @@ private void saveConnectedServicesEnabledState() { Collection connectedServices = Registry.instance().getConnectedServices(connectionToEdit); - if (connectedServices == null) + if (connectedServices.isEmpty()) return; if (savedEnabledStates == null) savedEnabledStates = new HashMap(); @@ -150,7 +150,7 @@ private void enableConnectedServices(boolean enabled) { Collection connectedServices = Registry.instance().getConnectedServices(connectionToEdit); - if (connectedServices == null || savedEnabledStates == null) + if (connectedServices.isEmpty() || savedEnabledStates == null) return; for (IConnectedService connectedService : connectedServices) { if (!enabled) // disable when asked diff -r e3db0fe33733 -r a514fb7b2032 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 11:50:08 2010 -0600 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/ConnectToDeviceDialog.java Wed Feb 17 12:52:01 2010 -0800 @@ -196,11 +196,9 @@ if (connection != null) { IConnectedService connectedService = null; Collection services = manager.getConnectedServices(connection); - if (services != null) { - for (IConnectedService service : services) { - if (service != null && service.getService().getIdentifier().equals(data.getService().getIdentifier())) { - connectedService = service; - } + for (IConnectedService service : services) { + if (service != null && service.getService().getIdentifier().equals(data.getService().getIdentifier())) { + connectedService = service; } }