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:
parent
cfff0b800c
commit
80c7769767
4 changed files with 12 additions and 12 deletions
|
|
@ -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 -> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue