Name: rmT116609 Date: 09/02/2003
A DESCRIPTION OF THE REQUEST :
It would be nice if one could check to see if reverse DNS would be required before calling getHostName().
For instance HTTP logging code could do something like this:
InetSocketAddress a = (InetSocketAddress)socket.getLocalSocketAddress();
if (a.isReverseResolved()) {
out.print(a.getHostName());
} else {
out.print(a.getAddress().getHostAddress());
}
JUSTIFICATION :
In various circumstances, such as logging HTTP requests, it is useful to provide a DNS name, but not worth the performance hit if the address has not be reverse resolved, particularly if there is a risk that address has no corresponding DNS name. To support this it would be nice if a new method isReverseResolved() was added to InetSocketAddress.
(Incident Review ID: 201605)
======================================================================