Re: [jira] Updated: (HARMONY-73) java.net.InetAddress.getLocalHost() returns wrong host name for loopback address

2006-02-10 Thread Geir Magnusson Jr
Ok. The behavior strikes me as dumb. Why return a textual representation? What good does that do anyone? The caller has no clue there was a problem... geir Paulex Yang wrote: As I commented in the JIRA, further study shows some interesting facts, first, my prior patch is redundant, the

Re: [jira] Updated: (HARMONY-73) java.net.InetAddress.getLocalHost() returns wrong host name for loopback address

2006-02-09 Thread Paulex Yang
As I commented in the JIRA, further study shows some interesting facts, first, my prior patch is redundant, the actual bug is http://issues.apache.org/jira/browse/HARMONY-84. second, there is another different behavior of getHostName() between RI and Harmony, but I consider it as RI's bug:

Re: [jira] Updated: (HARMONY-73) java.net.InetAddress.getLocalHost() returns wrong host name for loopback address

2006-02-08 Thread huangzhu zhang
When SecurityManager doesn't allow the "lookup" operation, it returns "localhost" instead of "127.0.0.1". Otherwise, getHostName method will look up the real hostname. On 2/9/06, Geir Magnusson Jr <[EMAIL PROTECTED]> wrote: > > isn't "localhost" actually something in the local hosts file? Don't

Re: [jira] Updated: (HARMONY-73) java.net.InetAddress.getLocalHost() returns wrong host name for loopback address

2006-02-08 Thread Geir Magnusson Jr
isn't "localhost" actually something in the local hosts file? Don't you want to look this up? Paulex Yang (JIRA) wrote: [ http://issues.apache.org/jira/browse/HARMONY-73?page=all ] Paulex Yang updated HARMONY-73: --- Attachment: InetAddress.patch A sugge

[jira] Updated: (HARMONY-73) java.net.InetAddress.getLocalHost() returns wrong host name for loopback address

2006-02-08 Thread Paulex Yang (JIRA)
[ http://issues.apache.org/jira/browse/HARMONY-73?page=all ] Paulex Yang updated HARMONY-73: --- Attachment: InetAddress.patch A suggested modification is to add these two lines before Ln. 296 of java.net.InetAddress, if(this == LOOPBACK){ return "loc