private static HttpHost normalize(final HttpHost target) { if (target.getPort() >= 0 ) { return target; } else { final InetAddress address = target.getAddress(); final String schemeName = target.getSchemeName(); if (address != null) { return new HttpHost(address, getDefaultPort(schemeName), schemeName); } else { final String hostName = target.getHostName(); return new HttpHost(hostName, getDefaultPort(schemeName), schemeName); } } }
private static HttpHost normalize(final HttpHost target) { if (target.getPort() >= 0 ) { return target; } else { final InetAddress address = target.getAddress(); final String schemeName = target.getSchemeName(); if (address != null) { return new HttpHost(address, getDefaultPort(schemeName), schemeName); } else { final String hostName = target.getHostName(); return new HttpHost(hostName, getDefaultPort(schemeName), schemeName); } } }
private static HttpHost normalize(final HttpHost target) { if (target.getPort() >= 0 ) { return target; } else { final InetAddress address = target.getAddress(); final String schemeName = target.getSchemeName(); if (address != null) { return new HttpHost(address, getDefaultPort(schemeName), schemeName); } else { final String hostName = target.getHostName(); return new HttpHost(hostName, getDefaultPort(schemeName), schemeName); } } }
private static HttpHost normalize(final HttpHost target) { if (target.getPort() >= 0 ) { return target; } else { final InetAddress address = target.getAddress(); final String schemeName = target.getSchemeName(); if (address != null) { return new HttpHost(address, getDefaultPort(schemeName), schemeName); } else { final String hostName = target.getHostName(); return new HttpHost(hostName, getDefaultPort(schemeName), schemeName); } } }
private static HttpHost normalize(final HttpHost target) { if (target.getPort() >= 0 ) { return target; } else { final InetAddress address = target.getAddress(); final String schemeName = target.getSchemeName(); if (address != null) { return new HttpHost(address, getDefaultPort(schemeName), schemeName); } else { final String hostName = target.getHostName(); return new HttpHost(hostName, getDefaultPort(schemeName), schemeName); } } }