You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Paulex Yang (JIRA)" <ji...@apache.org> on 2006/08/08 14:37:16 UTC
[jira] Assigned: (HARMONY-1102) [classlib][luni] Method
readResolve() missing in java.util.Collections.EmptySet, EmptyList and
EmptyMap.
[ http://issues.apache.org/jira/browse/HARMONY-1102?page=all ]
Paulex Yang reassigned HARMONY-1102:
------------------------------------
Assignee: Paulex Yang
> [classlib][luni] Method readResolve() missing in java.util.Collections.EmptySet, EmptyList and EmptyMap.
> --------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1102
> URL: http://issues.apache.org/jira/browse/HARMONY-1102
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: spark shen
> Assigned To: Paulex Yang
> Attachments: harmony-1102.diff
>
>
> Method readResolve() missing in java.util.Collections.EmptySet,
> EmptyList and EmptyMap.The instances of "public static final Map
> EMPTY_MAP","public static final Set EMPTY_Set" and "public static final List
> EMPTY_List" should be a singleton respectively according to the following test
> cases, and should keep as a singleton respectively after de-serialization.
> JIRA testcase:
> public void test_EmptyList_Singleton() throws Exception {
> List theEmptyList = Collections.EMPTY_LIST;
> List same1 = (List) SerializationTester
> .getDeserilizedObject(theEmptyList);
> List same2 = (List) SerializationTester
> .getDeserilizedObject(theEmptyList);
> assertSame(same1, same2);
> assertSame(same1, theEmptyList);
> }
> public void test_EmptyMap_Singleton() throws Exception {
> Map theEmptyMap = Collections.EMPTY_MAP;
> Map sameMap1 = (Map) SerializationTester
> .getDeserilizedObject(theEmptyMap);
> Map sameMap2 = (Map) SerializationTester
> .getDeserilizedObject(theEmptyMap);
> assertSame(sameMap1, sameMap2);
> assertSame(sameMap1, theEmptyMap);
> }
> public void test_EmptySet_Singleton() throws Exception {
> Set theEmptySet = Collections.EMPTY_SET;
> Set sameSet1 = (Set) SerializationTester
> .getDeserilizedObject(theEmptySet);
> Set sameSet2 = (Set) SerializationTester
> .getDeserilizedObject(theEmptySet);
> assertSame(sameSet1, sameSet2);
> assertSame(sameSet1, theEmptySet);
> }
> JIRA test result
> RI 5.0 passes this test, but Harmony fails.
> I will attach a patch to fix this problem.
> Best regards
> Spark shen
--
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