Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 25630 invoked from network); 16 May 2007 12:52:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 May 2007 12:52:38 -0000 Received: (qmail 41922 invoked by uid 500); 16 May 2007 12:52:44 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 41892 invoked by uid 500); 16 May 2007 12:52:44 -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 41883 invoked by uid 99); 16 May 2007 12:52:44 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 May 2007 05:52:44 -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; Wed, 16 May 2007 05:52:37 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id F3E9A714072 for ; Wed, 16 May 2007 05:52:16 -0700 (PDT) Message-ID: <13154711.1179319936997.JavaMail.jira@brutus> Date: Wed, 16 May 2007 05:52:16 -0700 (PDT) From: "spark shen (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-3865) [classlib][luni] AbstractMap seems to have a flawed equals method In-Reply-To: <4235272.1179209176279.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-3865?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] spark shen updated HARMONY-3865: -------------------------------- Attachment: (was: AbstractMap.patch) > [classlib][luni] AbstractMap seems to have a flawed equals method > ----------------------------------------------------------------- > > Key: HARMONY-3865 > URL: https://issues.apache.org/jira/browse/HARMONY-3865 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: spark shen > Assigned To: Paulex Yang > Attachments: AbstractMap.patch > > > The following test case will fail on Harmony, but pass on RI > public class AMT extends AbstractMap { > // Very crude AbstractMap implementation > Vector values = new Vector(); > Vector keys = new Vector(); > public Set entrySet() { > return new AbstractSet() { > public Iterator iterator() { > return new Iterator() { > int index = 0; > public boolean hasNext() { > return index < values.size(); > } > public Object next() { > if (index < values.size()) { > Map.Entry me = new Map.Entry() { > Object v = values.elementAt(index); > Object k = keys.elementAt(index); > public Object getKey() { > return k; > } > public Object getValue() { > return v; > } > public Object setValue(Object value) { > return null; > } > }; > index++; > return me; > } > return null; > } > public void remove() { > } > }; > } > public int size() { > return values.size(); > } > }; > } > public Object put(Object k, Object v) { > keys.add(k); > values.add(v); > return v; > } > } > > /** > * @tests {@link java.util.AbstractMap#putAll(Map)} > */ > public void test_putAllLMap() { > Hashtable ht = new Hashtable(); > AMT amt = new AMT(); > ht.put("this", "that"); > amt.putAll(ht); > amt.equals(ht); > assertEquals("Should be equal", amt, ht); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.