You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrew Zhang (JIRA)" <ji...@apache.org> on 2006/08/02 06:33:15 UTC
[jira] Created: (HARMONY-1039) [classlib][luni]
java.net.Inet6Address throws NullPointerException when deserializing an
object with "null" interface name.
[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
[jira] Assigned: (HARMONY-1039) [classlib][luni]
java.net.Inet6Address throws NullPointerException when deserializing an
object with "null" interface name.
Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1039?page=all ]
Paulex Yang reassigned HARMONY-1039:
------------------------------------
Assignee: Paulex Yang
> [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
[jira] Resolved: (HARMONY-1039) [classlib][luni]
java.net.Inet6Address throws NullPointerException when deserializing an
object with "null" interface name.
Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
[ 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
[jira] Commented: (HARMONY-1039) [classlib][luni]
java.net.Inet6Address throws NullPointerException when deserializing an
object with "null" interface name.
Posted by "Andrew Zhang (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1039?page=comments#action_12426402 ]
Andrew Zhang commented on HARMONY-1039:
---------------------------------------
Hi Paulex,
The fix looks fine, thanks a lot!
Best regards,
Andrew
> [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
[jira] Updated: (HARMONY-1039) [classlib][luni]
java.net.Inet6Address throws NullPointerException when deserializing an
object with "null" interface name.
Posted by "Andrew Zhang (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1039?page=all ]
Andrew Zhang updated HARMONY-1039:
----------------------------------
Attachment: Inet6Address.golden.1.ser
Inet6Address.golden.1.ser is for described test to reproduce the bug.
I'll upload a patch to fix this problem soon.
Thanks!
Best regards,
Andrew
> [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
> Attachments: 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
[jira] Updated: (HARMONY-1039) [classlib][luni]
java.net.Inet6Address throws NullPointerException when deserializing an
object with "null" interface name.
Posted by "Andrew Zhang (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1039?page=all ]
Andrew Zhang updated HARMONY-1039:
----------------------------------
Attachment: Harmony-1039.zip
Hello,
Would you please try my patch Harmony-1039.zip?
To apply this patch, please:
1. unzip Harmony-1039.zip to luni module
2. run 01.filescopy.sh
3. apply 02.luni.diff on luni module
Thanks!
Best regards,
Andrew
> [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
> 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