/** * Build or get the server from the list of server already build from the passed url * @param url extracting the server from this url * @return the corresponding server */ public Server getServer(final URL url) { return getOrAddServerIfNotExist( MethodUtils.normalizeName(url.getHost()), url.getHost(), String.valueOf(url.getPort() != -1 ? url.getPort() : url.getDefaultPort()), Optional.of(url.getProtocol())); }