diff --git a/src/test/org/apache/commons/collections/TestMapUtils.java b/src/test/org/apache/commons/collections/TestMapUtils.java index 39f64f2a8..9d1081bc7 100644 --- a/src/test/org/apache/commons/collections/TestMapUtils.java +++ b/src/test/org/apache/commons/collections/TestMapUtils.java @@ -49,6 +49,7 @@ import org.apache.commons.collections.collection.TestTransformedCollection; * @author Janek Bogucki * @author Neil O'Toole */ +@SuppressWarnings("boxing") public class TestMapUtils extends BulkTest { public TestMapUtils(String name) { @@ -744,7 +745,7 @@ public class TestMapUtils extends BulkTest { public void testPopulateMap() { // Setup Test Data - List list = new ArrayList(); + List list = new ArrayList(); list.add("1"); list.add("3"); list.add("5"); @@ -754,27 +755,27 @@ public class TestMapUtils extends BulkTest { list.add("6"); // Now test key transform population - Map map = new HashMap(); + Map map = new HashMap(); MapUtils.populateMap(map, list, TestTransformedCollection.STRING_TO_INTEGER_TRANSFORMER); assertEquals(list.size(), map.size()); for (int i = 0; i < list.size(); i++) { - assertEquals(true, map.containsKey(new Integer((String) list.get(i)))); + assertEquals(true, map.containsKey(new Integer(list.get(i)))); assertEquals(false, map.containsKey(list.get(i))); assertEquals(true, map.containsValue(list.get(i))); - assertEquals(list.get(i), map.get(new Integer((String) list.get(i)))); + assertEquals(list.get(i), map.get(new Integer(list.get(i)))); } // Now test both Key-Value transform population - map = new HashMap(); + map = new HashMap(); MapUtils.populateMap(map, list, TestTransformedCollection.STRING_TO_INTEGER_TRANSFORMER, TestTransformedCollection.STRING_TO_INTEGER_TRANSFORMER); assertEquals(list.size(), map.size()); for (int i = 0; i < list.size(); i++) { - assertEquals(true, map.containsKey(new Integer((String) list.get(i)))); + assertEquals(true, map.containsKey(new Integer(list.get(i)))); assertEquals(false, map.containsKey(list.get(i))); - assertEquals(true, map.containsValue(new Integer((String) list.get(i)))); - assertEquals(new Integer((String) list.get(i)), map.get(new Integer((String) list.get(i)))); + assertEquals(true, map.containsValue(new Integer(list.get(i)))); + assertEquals(new Integer(list.get(i)), map.get(new Integer(list.get(i)))); } } diff --git a/src/test/org/apache/commons/collections/TestPredicateUtils.java b/src/test/org/apache/commons/collections/TestPredicateUtils.java index 1e2bc24f2..c43ed8cb1 100644 --- a/src/test/org/apache/commons/collections/TestPredicateUtils.java +++ b/src/test/org/apache/commons/collections/TestPredicateUtils.java @@ -49,6 +49,7 @@ import org.junit.Test; * @author Stephen Colebourne * @author Matt Benson */ +@SuppressWarnings("boxing") public class TestPredicateUtils extends BasicPredicateTestBase { /** * Set up instance variables required by this test case. diff --git a/src/test/org/apache/commons/collections/buffer/TestPriorityBuffer.java b/src/test/org/apache/commons/collections/buffer/TestPriorityBuffer.java index bf8c51aa8..9304b3500 100644 --- a/src/test/org/apache/commons/collections/buffer/TestPriorityBuffer.java +++ b/src/test/org/apache/commons/collections/buffer/TestPriorityBuffer.java @@ -39,6 +39,7 @@ import org.apache.commons.collections.comparators.ReverseComparator; * @author Michael A. Smith * @author Steve Phelps */ +@SuppressWarnings("boxing") public class TestPriorityBuffer extends AbstractTestCollection { public TestPriorityBuffer(String testName) { diff --git a/src/test/org/apache/commons/collections/comparators/TestBooleanComparator.java b/src/test/org/apache/commons/collections/comparators/TestBooleanComparator.java index 35cd9c0ca..bbad7a84f 100644 --- a/src/test/org/apache/commons/collections/comparators/TestBooleanComparator.java +++ b/src/test/org/apache/commons/collections/comparators/TestBooleanComparator.java @@ -27,6 +27,7 @@ import java.util.List; * * @author Rodney Waldhoff */ +@SuppressWarnings("boxing") public class TestBooleanComparator extends AbstractTestComparator { // conventional diff --git a/src/test/org/apache/commons/collections/comparators/TestComparableComparator.java b/src/test/org/apache/commons/collections/comparators/TestComparableComparator.java index cf21f4981..7323124ff 100644 --- a/src/test/org/apache/commons/collections/comparators/TestComparableComparator.java +++ b/src/test/org/apache/commons/collections/comparators/TestComparableComparator.java @@ -25,8 +25,8 @@ import java.util.List; * * @version $Revision$ $Date$ * - * @author Unknown */ +@SuppressWarnings("boxing") public class TestComparableComparator extends AbstractTestComparator { public TestComparableComparator(String testName) { diff --git a/src/test/org/apache/commons/collections/functors/AbstractTestAnyAllOnePredicate.java b/src/test/org/apache/commons/collections/functors/AbstractTestAnyAllOnePredicate.java index 3be4a6124..ddfd880d1 100644 --- a/src/test/org/apache/commons/collections/functors/AbstractTestAnyAllOnePredicate.java +++ b/src/test/org/apache/commons/collections/functors/AbstractTestAnyAllOnePredicate.java @@ -73,6 +73,7 @@ public abstract class AbstractTestAnyAllOnePredicate extends AbstractTestComp * Tests creating composite predicate instances with single predicates and verifies that the composite returns * the same value as the single predicate does. */ + @SuppressWarnings("boxing") public final void singleValues() { assertTrue(getPredicateInstance(true).evaluate(null)); assertFalse(getPredicateInstance(false).evaluate(null)); diff --git a/src/test/org/apache/commons/collections/functors/MockPredicateTestBase.java b/src/test/org/apache/commons/collections/functors/MockPredicateTestBase.java index acece3056..3ae75ebad 100644 --- a/src/test/org/apache/commons/collections/functors/MockPredicateTestBase.java +++ b/src/test/org/apache/commons/collections/functors/MockPredicateTestBase.java @@ -91,7 +91,7 @@ public abstract class MockPredicateTestBase { * * @return a single mock predicate. */ - @SuppressWarnings({"unchecked"}) + @SuppressWarnings({"unchecked", "boxing"}) protected final Predicate createMockPredicate(final Boolean returnValue) { final Predicate mockPredicate = EasyMock.createMock(Predicate.class); if (returnValue != null) { diff --git a/src/test/org/apache/commons/collections/functors/TestAllPredicate.java b/src/test/org/apache/commons/collections/functors/TestAllPredicate.java index 4ad33da8e..154210b23 100644 --- a/src/test/org/apache/commons/collections/functors/TestAllPredicate.java +++ b/src/test/org/apache/commons/collections/functors/TestAllPredicate.java @@ -18,6 +18,7 @@ import java.util.Collections; * * @author Edwin Tellman */ +@SuppressWarnings("boxing") public class TestAllPredicate extends AbstractTestAnyAllOnePredicate { /** diff --git a/src/test/org/apache/commons/collections/functors/TestEqualPredicate.java b/src/test/org/apache/commons/collections/functors/TestEqualPredicate.java index 2eda5b440..34ae592ff 100644 --- a/src/test/org/apache/commons/collections/functors/TestEqualPredicate.java +++ b/src/test/org/apache/commons/collections/functors/TestEqualPredicate.java @@ -45,6 +45,7 @@ public class TestEqualPredicate extends BasicPredicateTestBase { assertTrue(equalPredicate(TRUE_OBJECT), TRUE_OBJECT); } + @SuppressWarnings("boxing") @Test public void testPredicateTypeCanBeSuperClassOfObject() throws Exception { Predicate predicate = equalPredicate((Number) 4); diff --git a/src/test/org/apache/commons/collections/iterators/TestCollatingIterator.java b/src/test/org/apache/commons/collections/iterators/TestCollatingIterator.java index 5c82d0641..8285e9bd8 100644 --- a/src/test/org/apache/commons/collections/iterators/TestCollatingIterator.java +++ b/src/test/org/apache/commons/collections/iterators/TestCollatingIterator.java @@ -27,6 +27,7 @@ import org.apache.commons.collections.comparators.ComparableComparator; * @version $Revision$ $Date$ * @author Rodney Waldhoff */ +@SuppressWarnings("boxing") public class TestCollatingIterator extends AbstractTestIterator { //------------------------------------------------------------ Conventional diff --git a/src/test/org/apache/commons/collections/iterators/TestFilterListIterator.java b/src/test/org/apache/commons/collections/iterators/TestFilterListIterator.java index 8d1d24d4c..57c60a077 100644 --- a/src/test/org/apache/commons/collections/iterators/TestFilterListIterator.java +++ b/src/test/org/apache/commons/collections/iterators/TestFilterListIterator.java @@ -31,6 +31,7 @@ import org.apache.commons.collections.Predicate; * * @author Rodney Waldhoff */ +@SuppressWarnings("boxing") public class TestFilterListIterator extends TestCase { public TestFilterListIterator(String testName) { super(testName); diff --git a/src/test/org/apache/commons/collections/map/TestLazyMap.java b/src/test/org/apache/commons/collections/map/TestLazyMap.java index d6dc178cb..b3070abd4 100644 --- a/src/test/org/apache/commons/collections/map/TestLazyMap.java +++ b/src/test/org/apache/commons/collections/map/TestLazyMap.java @@ -35,6 +35,7 @@ import org.junit.Test; * * @author Phil Steitz */ +@SuppressWarnings("boxing") public class TestLazyMap extends AbstractTestIterableMap { private static final Factory oneFactory = FactoryUtils.constantFactory(1); diff --git a/src/test/org/apache/commons/collections/map/TestLazySortedMap.java b/src/test/org/apache/commons/collections/map/TestLazySortedMap.java index 5485b1609..b837c2e2f 100644 --- a/src/test/org/apache/commons/collections/map/TestLazySortedMap.java +++ b/src/test/org/apache/commons/collections/map/TestLazySortedMap.java @@ -38,6 +38,7 @@ import org.junit.Test; * * @author Phil Steitz */ +@SuppressWarnings("boxing") public class TestLazySortedMap extends AbstractTestSortedMap { private static final Factory oneFactory = FactoryUtils.constantFactory(1);