The problem comes from the getHostName() call inorg.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(InetSocketAddress[],String, String, Properties, Logger).
doAuthentication(newStream, address.getHostName(), user, info, logger);