Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 40980 invoked from network); 8 Aug 2006 10:48:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Aug 2006 10:48:03 -0000 Received: (qmail 83384 invoked by uid 500); 8 Aug 2006 10:48:02 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 83289 invoked by uid 500); 8 Aug 2006 10:48:02 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 83278 invoked by uid 99); 8 Aug 2006 10:48:02 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Aug 2006 03:48:02 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Aug 2006 03:48:02 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E5EAE41000E for ; Tue, 8 Aug 2006 10:45:14 +0000 (GMT) Message-ID: <31353146.1155033914938.JavaMail.jira@brutus> Date: Tue, 8 Aug 2006 03:45:14 -0700 (PDT) From: "spark shen (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Created: (HARMONY-1102) [classlib][luni] Method readResolve() missing in java.util.Collections.EmptySet, EmptyList and EmptyMap. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [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 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