public static InetSocketAddress replaceWithResolved ( InetSocketAddress inetSocketAddress ) { if ( ! inetSocketAddress . isUnresolved ( ) ) { return inetSocketAddress ; } inetSocketAddress = replaceUnresolvedNumericIp ( inetSocketAddress ) ; if ( ! inetSocketAddress . isUnresolved ( ) ) { return inetSocketAddress ; } else { return new InetSocketAddress ( inetSocketAddress . getHostString ( ) , inetSocketAddress . getPort ( ) ) ; } }
Replaces an unresolved InetSocketAddress with a resolved instance in the case that the passed address is unresolved .