Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 35190 invoked from network); 15 Sep 2009 05:58:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Sep 2009 05:58:03 -0000 Received: (qmail 47780 invoked by uid 500); 15 Sep 2009 05:58:02 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 47717 invoked by uid 500); 15 Sep 2009 05:58:02 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 47708 invoked by uid 99); 15 Sep 2009 05:58:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Sep 2009 05:58:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Sep 2009 05:57:58 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D0ACB23889BA; Tue, 15 Sep 2009 05:57:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r815132 - /commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestStaticBucketMap.java Date: Tue, 15 Sep 2009 05:57:37 -0000 To: commits@commons.apache.org From: bayard@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090915055737.D0ACB23889BA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bayard Date: Tue Sep 15 05:57:37 2009 New Revision: 815132 URL: http://svn.apache.org/viewvc?rev=815132&view=rev Log: Merging from -r468106:814127 of collections_jdk5_branch - namely where this code was generified; mostly in r738956. Also see the following revisions: ------------------------------------------------------------------------ r740150 | mbenson | 2009-02-02 15:24:00 -0800 (Mon, 02 Feb 2009) | 1 line make all [collections] maps implement IterableMap ------------------------------------------------------------------------ Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestStaticBucketMap.java Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestStaticBucketMap.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestStaticBucketMap.java?rev=815132&r1=815131&r2=815132&view=diff ============================================================================== --- commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestStaticBucketMap.java (original) +++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestStaticBucketMap.java Tue Sep 15 05:57:37 2009 @@ -16,8 +16,6 @@ */ package org.apache.commons.collections.map; -import java.util.Map; - import junit.framework.Test; import org.apache.commons.collections.BulkTest; @@ -30,7 +28,7 @@ * * @author Michael A. Smith */ -public class TestStaticBucketMap extends AbstractTestMap { +public class TestStaticBucketMap extends AbstractTestIterableMap { public TestStaticBucketMap(String name) { super(name); @@ -45,8 +43,16 @@ junit.textui.TestRunner.main(testCaseName); } - public Map makeEmptyMap() { - return new StaticBucketMap(30); + public StaticBucketMap makeObject() { + return new StaticBucketMap(30); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean isFailFastExpected() { + return false; } public String[] ignoredTests() { @@ -60,9 +66,10 @@ } // Bugzilla 37567 + @SuppressWarnings("unchecked") public void test_get_nullMatchesIncorrectly() { - StaticBucketMap map = new StaticBucketMap(17); - map.put(null, "A"); + StaticBucketMap map = new StaticBucketMap(17); + map.put(null, (V) "A"); assertEquals("A", map.get(null)); // loop so we find a string that is in the same bucket as the null for (int i = 'A'; i <= 'Z'; i++) { @@ -71,9 +78,10 @@ } } + @SuppressWarnings("unchecked") public void test_containsKey_nullMatchesIncorrectly() { - StaticBucketMap map = new StaticBucketMap(17); - map.put(null, "A"); + StaticBucketMap map = new StaticBucketMap(17); + map.put(null, (V) "A"); assertEquals(true, map.containsKey(null)); // loop so we find a string that is in the same bucket as the null for (int i = 'A'; i <= 'Z'; i++) { @@ -82,9 +90,10 @@ } } + @SuppressWarnings("unchecked") public void test_containsValue_nullMatchesIncorrectly() { - StaticBucketMap map = new StaticBucketMap(17); - map.put("A", null); + StaticBucketMap map = new StaticBucketMap(17); + map.put((K) "A", null); assertEquals(true, map.containsValue(null)); // loop so we find a string that is in the same bucket as the null for (int i = 'A'; i <= 'Z'; i++) {