Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 29700 invoked from network); 6 Sep 2007 03:04:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Sep 2007 03:04:05 -0000 Received: (qmail 50982 invoked by uid 500); 6 Sep 2007 03:03:59 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 50966 invoked by uid 500); 6 Sep 2007 03:03:59 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 50957 invoked by uid 99); 6 Sep 2007 03:03:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Sep 2007 20:03:59 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2007 03:05:22 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E74A0714035 for ; Wed, 5 Sep 2007 20:03:41 -0700 (PDT) Message-ID: <7677722.1189047821603.JavaMail.jira@brutus> Date: Wed, 5 Sep 2007 20:03:41 -0700 (PDT) From: "Sean Qiu (JIRA)" To: commits@harmony.apache.org Subject: [jira] Created: (HARMONY-4750) [classlib][luni] HashMap.HashMapEntrySet.contains(Object) cannot find custmized entry without override the equal method MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [classlib][luni] HashMap.HashMapEntrySet.contains(Object) cannot find custmized entry without override the equal method ----------------------------------------------------------------------------------------------------------------------- Key: HARMONY-4750 URL: https://issues.apache.org/jira/browse/HARMONY-4750 Project: Harmony Issue Type: Bug Components: Classlib Reporter: Sean Qiu Description: HashMap.HashMapEntrySet.contains(Object) cannot find custmized entry if the entry hasn't override the equal method. Testcase: @SuppressWarnings("unchecked") public void test_EntrySet(){ HashMap map = new HashMap(); map.put(new Integer(1), "ONE"); Set entrySet = map.entrySet(); Iterator e = entrySet.iterator(); Object a = e.next(); assertFalse(e.hasNext()); Map.Entry entry = new MockEntry(); assertTrue(entrySet.contains(entry)); entrySet.remove(entry); assertFalse(entrySet.contains(entry)); } private static class MockEntry implements Map.Entry{ public Object getKey() { return new Integer(1); } public Object getValue() { return "ONE"; } public Object setValue(Object object) { return null; } } Result: RI can pass this test while harmony will fail. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.