better fix NPE when connection id is null (found with traceviewer)
authordadubrow
Tue, 23 Feb 2010 08:56:01 -0600
changeset 1007 3cb773e29ddc
parent 1003 22361e311ca4
child 1009 64772cb3290b
better fix NPE when connection id is null (found with traceviewer)
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	Mon Feb 22 15:27:20 2010 -0600
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java	Tue Feb 23 08:56:01 2010 -0600
@@ -517,7 +517,7 @@
 	
 	public ISelectedConnectionInfo ensureConnection(String id, IService service) throws CoreException {
 		Check.checkArg(service);
-		final boolean wasCurrentConnection = id.equals(CURRENT_CONNECTION_ID);
+		final boolean wasCurrentConnection = CURRENT_CONNECTION_ID.equals(id);
 		final IConnection[] connectionHolder = { findConnection(id) };
 		final String[] storableIdHolder = { id };
 		if (!isCompatibleConnection(connectionHolder[0], service)) {