Use InetSocketAddress.getHostString in favour of getHostName (#22785)

Saves a reverse lookup when the address was initialized as an address.
This commit is contained in:
Arnout Engelen 2017-04-25 22:23:36 -07:00 committed by Johan Andrén
parent cfff0b800c
commit 80c7769767
4 changed files with 12 additions and 12 deletions

View file

@ -71,7 +71,7 @@ public class StreamTcpDocTest extends AbstractJavaTest {
final InetSocketAddress localhost = SocketUtil.temporaryServerAddress("127.0.0.1", false);
final Source<IncomingConnection, CompletionStage<ServerBinding>> connections =
Tcp.get(system).bind(localhost.getHostName(), localhost.getPort()); // TODO getHostString in Java7
Tcp.get(system).bind(localhost.getHostString(), localhost.getPort());
//#echo-server-simple-handle
connections.runForeach(connection -> {