Lines 122-128
Link Here
|
122 |
public final static String CLIENT_OLDER = "Older DataStore Client."; //$NON-NLS-1$ |
122 |
public final static String CLIENT_OLDER = "Older DataStore Client."; //$NON-NLS-1$ |
123 |
public final static String INCOMPATIBLE_PROTOCOL = "Incompatible Protocol."; //$NON-NLS-1$ |
123 |
public final static String INCOMPATIBLE_PROTOCOL = "Incompatible Protocol."; //$NON-NLS-1$ |
124 |
public final static String CANNOT_CONNECT = "Cannot connect to server."; //$NON-NLS-1$ |
124 |
public final static String CANNOT_CONNECT = "Cannot connect to server."; //$NON-NLS-1$ |
125 |
|
125 |
|
126 |
// TODO: should probably make this a public constant in 3.1 |
126 |
// TODO: should probably make this a public constant in 3.1 |
127 |
private final static String INVALID_DAEMON_PORT_NUMBER = "Invalid daemon port number."; //$NON-NLS-1$ |
127 |
private final static String INVALID_DAEMON_PORT_NUMBER = "Invalid daemon port number."; //$NON-NLS-1$ |
128 |
|
128 |
|
Lines 786-804
Link Here
|
786 |
result = new ConnectionStatus(false, e, true, mgr.getUntrustedCerts()); |
786 |
result = new ConnectionStatus(false, e, true, mgr.getUntrustedCerts()); |
787 |
return result; |
787 |
return result; |
788 |
} |
788 |
} |
789 |
catch (IllegalArgumentException e) { |
|
|
790 |
e = new IllegalArgumentException(INVALID_DAEMON_PORT_NUMBER); |
791 |
result = new ConnectionStatus(false, e); |
792 |
return result; |
793 |
} |
794 |
catch (Exception e) |
789 |
catch (Exception e) |
795 |
{ |
790 |
{ |
796 |
if (_launchSocket != null) |
791 |
if (_launchSocket != null) |
797 |
{ |
792 |
{ |
798 |
_launchSocket.close(); |
793 |
_launchSocket.close(); |
799 |
} |
794 |
} |
800 |
|
795 |
if (daemonPort <= 0 || daemonPort > 65535) { |
801 |
result = new ConnectionStatus(false, e); |
796 |
result = new ConnectionStatus(false, INVALID_DAEMON_PORT_NUMBER); |
|
|
797 |
} else { |
798 |
result = new ConnectionStatus(false, e); |
799 |
} |
802 |
return result; |
800 |
return result; |
803 |
} |
801 |
} |
804 |
} |
802 |
} |
Lines 827-834
Link Here
|
827 |
result = new ConnectionStatus(false, uhe); |
825 |
result = new ConnectionStatus(false, uhe); |
828 |
} |
826 |
} |
829 |
catch (IllegalArgumentException e) { |
827 |
catch (IllegalArgumentException e) { |
830 |
e = new IllegalArgumentException(INVALID_DAEMON_PORT_NUMBER); |
828 |
result = new ConnectionStatus(false, INVALID_DAEMON_PORT_NUMBER); |
831 |
result = new ConnectionStatus(false, e); |
|
|
832 |
} |
829 |
} |
833 |
catch (IOException ioe) |
830 |
catch (IOException ioe) |
834 |
{ |
831 |
{ |