getCanonicalHostName() throws NullPointerException
cool2man opened this issue · comments
Ralf Tossenberger commented
InetAddress.getLocalHost().getCanonicalHostName() throws a NullPointerException.
Stack trace:
at java.net.InetAddress.getCachedAddresses(InetAddress.java:897)
at java.net.InetAddress.getAllByName0(InetAddress.java:1272)
at java.net.InetAddress.getAllByName0(InetAddress.java:1253)
at java.net.InetAddress.getHostFromNameService(InetAddress.java:634)
at java.net.InetAddress.getCanonicalHostName(InetAddress.java:588)
David Zhang commented
I suggest to return "doppio" instead.