harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Wu (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2936) [classlib][luni]InetAddress.getByName does not support some textual representations
Date Tue, 02 Jan 2007 06:38:27 GMT
[classlib][luni]InetAddress.getByName does not support some textual representations 
------------------------------------------------------------------------------------

                 Key: HARMONY-2936
                 URL: http://issues.apache.org/jira/browse/HARMONY-2936
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Tony Wu


InetAddress.getByName does not support following textual representations 
d.d.d
d.d
d

testcase below shows the problem

public void test_getByName_ddd() throws IOException {
        InetAddress i = InetAddress.getByName("1.2.3");
        assertEquals("1.2.0.3",i.getHostAddress());
}
public void test_getByName_dd() throws IOException {
        InetAddress  i = InetAddress.getByName("1.2");
        assertEquals("1.0.0.2",i.getHostAddress());
}
public void test_getByName_d() throws IOException {
        InetAddress  i = InetAddress.getByName(String.valueOf(0xffffffffL));
        assertEquals("255.255.255.255",i.getHostAddress());
}


       

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message