harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Zhang (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-1039) [classlib][luni] java.net.Inet6Address throws NullPointerException when deserializing an object with "null" interface name.
Date Wed, 02 Aug 2006 04:33:15 GMT
[classlib][luni] java.net.Inet6Address throws NullPointerException when deserializing an object
with "null" interface name.
---------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-1039
                 URL: http://issues.apache.org/jira/browse/HARMONY-1039
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Andrew Zhang


java.net.Inet6Address throws NullPointerException when deserializing an object with "null"
interface name.
Following test reproduces the bug:
    public void testSerializationCompatibility_NullInterfaceName() throws Exception {
        final String SERIALIZATION_FILE_NAME1 = "serialization/java/net/Inet6Address.golden.1.ser";
        byte[] localv6 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 };
        Inet6Address ia = (Inet6Address) InetAddress.getByAddress(localv6);
        Inet6Address deIA = (Inet6Address) SerializationTester.readObject(ia,
                SERIALIZATION_FILE_NAME1);
        byte[] deAddr = deIA.getAddress();
        for (int i = 0; i < localv6.length; i++) {
            assertEquals(localv6[i], deAddr[i]);
        }
        assertEquals(ia.getScopeId(), deIA.getScopeId());
        assertEquals(ia.getScopedInterface(), deIA.getScopedInterface());
    }
To run this test case, please:
1. Copy the test to tests.api.java.net package.Inet6AddressTest
2. Copy Inet6Address.golden.1.ser to serialization.java.net.

The test passes against RI while fails against Harmony.
I'll upload a patch to fix this problem soon. 
Thanks!

Best regards,
Andrew

-- 
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