Backed out changeset 1dc37cfc99cd
authorJohn Dean <john.3.dean@nokia.com>
Wed, 17 Feb 2010 12:59:07 -0800
changeset 980 2856f9bc4ddf
parent 979 1dc37cfc99cd
child 981 77bc8173ce83
Backed out changeset 1dc37cfc99cd
connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java
connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ConnectionUIUtils.java
connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/SettingsWizard.java
debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/ConnectToDeviceDialog.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<IConnectedService>(connectedServices);
 		
-		return Collections.emptyList();
+		return null;
 	}
 
 	private File getConnectionStorageFile() {
--- 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<IConnectedService> 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) {
--- 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<IConnectedService> connectedServices = Registry.instance().getConnectedServices(connectionToEdit);
-		if (connectedServices.isEmpty())
+		if (connectedServices == null)
 			return;
 		if (savedEnabledStates == null)
 			savedEnabledStates = new HashMap<IConnectedService, Boolean>();
@@ -150,7 +150,7 @@
 
 	private void enableConnectedServices(boolean enabled) {
 		Collection<IConnectedService> 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
--- 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<IConnectedService> 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;
+						}
 					}
 				}