com.google.common.net.InetAddresses.forString(String ipString)
is better for this as it will not do a DNS lookup regardless of what string is passed to it.
com.google.common.net.InetAddresses.forString(String ipString)
is better for this as it will not do a DNS lookup regardless of what string is passed to it.