directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel L├ęcharny <>
Subject localhost/ problems...
Date Thu, 17 Sep 2015 14:43:17 GMT
Hi !

I was suprisingly hit another time by a failing test, where the client
is trying to connect to a server using "localhost" when the server was
listening on "".

I think we should get rid of those two Strings in our code (mainly tests).

There is a way to get the localhost and its name in java :

    String hostName = InetAddress.getLocalHost().getHostName();


    InetAddress hostName = InetAddress.getLocalHost();

This is what we should use.

Thoughts ?

View raw message