connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java
equal
deleted
inserted
replaced
515 } |
515 } |
516 } |
516 } |
517 |
517 |
518 public ISelectedConnectionInfo ensureConnection(String id, IService service) throws CoreException { |
518 public ISelectedConnectionInfo ensureConnection(String id, IService service) throws CoreException { |
519 Check.checkArg(service); |
519 Check.checkArg(service); |
520 if (id == null) |
520 final boolean wasCurrentConnection = CURRENT_CONNECTION_ID.equals(id); |
521 return null; |
|
522 final boolean wasCurrentConnection = id.equals(CURRENT_CONNECTION_ID); |
|
523 final IConnection[] connectionHolder = { findConnection(id) }; |
521 final IConnection[] connectionHolder = { findConnection(id) }; |
524 final String[] storableIdHolder = { id }; |
522 final String[] storableIdHolder = { id }; |
525 if (!isCompatibleConnection(connectionHolder[0], service)) { |
523 if (!isCompatibleConnection(connectionHolder[0], service)) { |
526 connectionHolder[0] = getCompatibleConnectionFromUser(service, storableIdHolder); |
524 connectionHolder[0] = getCompatibleConnectionFromUser(service, storableIdHolder); |
527 if (connectionHolder[0] == null) { |
525 if (connectionHolder[0] == null) { |