Use InetAddresses.forString instead of InetAddress.getByName 95/9495/1
authorMarek Gradzki <mgradzki@cisco.com>
Mon, 20 Nov 2017 12:14:17 +0000 (13:14 +0100)
committerMarek Gradzki <mgradzki@cisco.com>
Mon, 20 Nov 2017 12:25:55 +0000 (13:25 +0100)
commitf491b8b15cb634eac60378b0504a715c0ad8ccda
tree8c6445f290d2e0a6b58062f1a14ba43dd8e72e78
parent0f92e8f1eb7ec29f589ed92c55b049f13cce0f30
Use InetAddresses.forString instead of InetAddress.getByName

Unlike InetAddress.getByName(), Guava's InetAddresses.forString()
never cause DNS services to be accessed.
JDK equivalents whenever you are expecting to handle only IP address string literals,
so there is no blocking DNS penalty for a malformed string.

See:
https://google.github.io/guava/releases/22.0/api/docs/com/google/common/net/InetAddresses.html#forString-java.lang.String-

Change-Id: Id1fc5fa45465b0e0b3aea7d60b9fdb855240d902
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
infra/bgp-distribution-test/src/test/java/io/fd/honeycomb/infra/bgp/distro/BgpDistributionTest.java
infra/northbound/bgp/src/main/java/io/fd/honeycomb/infra/bgp/BgpServerProvider.java
infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfSshServerProvider.java
infra/northbound/netconf/src/main/java/io/fd/honeycomb/northbound/netconf/NetconfTcpServerProvider.java