harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulex Yang (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-1039) [classlib][luni] java.net.Inet6Address throws NullPointerException when deserializing an object with "null" interface name.
Date Thu, 03 Aug 2006 06:59:16 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-1039?page=all ]

Paulex Yang resolved HARMONY-1039.
----------------------------------

    Resolution: Fixed

Andrew, patch applied at revision r428263, thanks a lot for this enhancement, please verify
that the problem is fully fixed as you expected.


> [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
>         Assigned To: Paulex Yang
>         Attachments: Harmony-1039.zip, Inet6Address.golden.1.ser
>
>
> 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