|
@@ -60,7 +60,6 @@ import java.net.NoRouteToHostException;
|
60
|
60
|
import java.net.SocketException;
|
61
|
61
|
import java.net.SocketTimeoutException;
|
62
|
62
|
import java.net.URI;
|
63
|
|
-import java.net.URISyntaxException;
|
64
|
63
|
import java.net.UnknownHostException;
|
65
|
64
|
import java.util.ArrayList;
|
66
|
65
|
import java.util.Collection;
|
|
@@ -214,8 +213,7 @@ public class Server implements Connection {
|
214
|
213
|
}
|
215
|
214
|
|
216
|
215
|
/**
|
217
|
|
- * Updates the connection details for this server. If the specified URI does not define a port,
|
218
|
|
- * the default port from the protocol description will be used.
|
|
216
|
+ * Updates the connection details for this server.
|
219
|
217
|
*
|
220
|
218
|
* @param uri The new URI that this server should connect to
|
221
|
219
|
* @param profile The profile that this server should use
|
|
@@ -224,17 +222,6 @@ public class Server implements Connection {
|
224
|
222
|
this.address = checkNotNull(uri);
|
225
|
223
|
this.protocolDescription = Optional.ofNullable(parserFactory.getDescription(uri));
|
226
|
224
|
this.profile = profile;
|
227
|
|
-
|
228
|
|
- if (uri.getPort() == -1) {
|
229
|
|
- protocolDescription.ifPresent(pd -> {
|
230
|
|
- try {
|
231
|
|
- this.address = new URI(uri.getScheme(), uri.getUserInfo(), uri.getHost(),
|
232
|
|
- pd.getDefaultPort(), uri.getPath(), uri.getQuery(), uri.getFragment());
|
233
|
|
- } catch (URISyntaxException ex) {
|
234
|
|
- LOG.warn(APP_ERROR, "Unable to construct URI", ex);
|
235
|
|
- }
|
236
|
|
- });
|
237
|
|
- }
|
238
|
225
|
}
|
239
|
226
|
|
240
|
227
|
@Override
|