commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1476855 [1/2] - in /commons/proper/collections/trunk/src: main/java/org/apache/commons/collections4/functors/ test/java/org/apache/commons/collections4/ test/java/org/apache/commons/collections4/bag/ test/java/org/apache/commons/collection...
Date Sun, 28 Apr 2013 23:15:55 GMT
Author: sebb
Date: Sun Apr 28 23:15:54 2013
New Revision: 1476855

URL: http://svn.apache.org/r1476855
Log:
Don't use inefficient new Integer

Modified:
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/ComparatorPredicate.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/ClosureUtilsTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/CollectionUtilsTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/EnumerationUtilsTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/FactoryUtilsTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/IteratorUtilsTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/ListUtilsTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/MapUtilsTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/PredicateUtilsTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/TransformerUtilsTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/PredicatedBagTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TransformedBagTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TransformedSortedBagTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/PredicatedCollectionTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/TransformedCollectionTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/AbstractNullComparatorTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/ComparatorChainTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/ReverseComparatorTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AbstractPredicateTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/ArrayIterator2Test.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/CollatingIteratorTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/FilterListIteratorTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/IteratorChainTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/LazyIteratorChainTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/keyvalue/MultiKeyTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/AbstractListTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/CursorableLinkedListTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/GrowthListTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/PredicatedListTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/SetUniqueListTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/TransformedListTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/TreeListTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/UnmodifiableListTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/CaseInsensitiveMapTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/DefaultedMapTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/Flat3MapTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/ListOrderedMapTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/MultiKeyMapTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/MultiValueMapTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/PredicatedMapTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/PredicatedSortedMapTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/ReferenceIdentityMapTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/ReferenceMapTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/SingletonMapTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/TransformedMapTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/TransformedSortedMapTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/queue/TransformedQueueTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/AbstractSortedSetTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/ListOrderedSet2Test.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/ListOrderedSetTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/PredicatedSetTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/TransformedSetTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/TransformedSortedSetTest.java
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/UnmodifiableSortedSetTest.java

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/ComparatorPredicate.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/ComparatorPredicate.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/ComparatorPredicate.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/ComparatorPredicate.java Sun Apr 28 23:15:54 2013
@@ -28,8 +28,8 @@ import org.apache.commons.collections4.P
  * In order to demonstrate the use of the predicate, the following variables are declared:
  *
  * <pre>
- * Integer ONE = new Integer(1);
- * Integer TWO = new Integer(2);
+ * Integer ONE = Integer.valueOf(1);
+ * Integer TWO = Integer.valueOf(2);
  *
  * Comparator comparator = new Comparator() {
  *

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/ClosureUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/ClosureUtilsTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/ClosureUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/ClosureUtilsTest.java Sun Apr 28 23:15:54 2013
@@ -111,7 +111,7 @@ public class ClosureUtilsTest extends Te
         ClosureUtils.invokerClosure("reverse").execute(buf);
         assertEquals("olleH", buf.toString());
         buf = new StringBuffer("Hello");
-        ClosureUtils.invokerClosure("setLength", new Class[] {Integer.TYPE}, new Object[] {new Integer(2)}).execute(buf);
+        ClosureUtils.invokerClosure("setLength", new Class[] {Integer.TYPE}, new Object[] {Integer.valueOf(2)}).execute(buf);
         assertEquals("He", buf.toString());
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/CollectionUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/CollectionUtilsTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/CollectionUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/CollectionUtilsTest.java Sun Apr 28 23:15:54 2013
@@ -1213,7 +1213,7 @@ public class CollectionUtilsTest extends
 
     Transformer<Object, Integer> TRANSFORM_TO_INTEGER = new Transformer<Object, Integer>() {
         public Integer transform(final Object input) {
-            return new Integer(((Long)input).intValue());
+            return Integer.valueOf(((Long)input).intValue());
         }
     };
 
@@ -1343,8 +1343,8 @@ public class CollectionUtilsTest extends
     @Test
     public void intersectionUsesMethodEquals() {
         // Let elta and eltb be objects...
-        final Integer elta = new Integer(17);
-        final Integer eltb = new Integer(17);
+        final Integer elta = Integer.valueOf(17);
+        final Integer eltb = Integer.valueOf(17);
 
         // ...which are equal...
         assertEquals(elta, eltb);

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/EnumerationUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/EnumerationUtilsTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/EnumerationUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/EnumerationUtilsTest.java Sun Apr 28 23:15:54 2013
@@ -57,19 +57,19 @@ public class EnumerationUtilsTest extend
 
     public void testToListWithHashtable() {
         final Hashtable<String, Integer> expected = new Hashtable<String, Integer>();
-        expected.put("one", new Integer(1));
-        expected.put("two", new Integer(2));
-        expected.put("three", new Integer(3));
+        expected.put("one", Integer.valueOf(1));
+        expected.put("two", Integer.valueOf(2));
+        expected.put("three", Integer.valueOf(3));
         // validate elements.
         final List<Integer> actualEltList = EnumerationUtils.toList(expected.elements());
         assertEquals(expected.size(), actualEltList.size());
-        assertTrue(actualEltList.contains(new Integer(1)));
-        assertTrue(actualEltList.contains(new Integer(2)));
-        assertTrue(actualEltList.contains(new Integer(3)));
+        assertTrue(actualEltList.contains(Integer.valueOf(1)));
+        assertTrue(actualEltList.contains(Integer.valueOf(2)));
+        assertTrue(actualEltList.contains(Integer.valueOf(3)));
         final List<Integer> expectedEltList = new ArrayList<Integer>();
-        expectedEltList.add(new Integer(1));
-        expectedEltList.add(new Integer(2));
-        expectedEltList.add(new Integer(3));
+        expectedEltList.add(Integer.valueOf(1));
+        expectedEltList.add(Integer.valueOf(2));
+        expectedEltList.add(Integer.valueOf(3));
         assertTrue(actualEltList.containsAll(expectedEltList));
 
         // validate keys.

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/FactoryUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/FactoryUtilsTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/FactoryUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/FactoryUtilsTest.java Sun Apr 28 23:15:54 2013
@@ -101,7 +101,7 @@ public class FactoryUtilsTest extends ju
     }
 
     public void testConstantFactoryConstant() {
-        final Integer constant = new Integer(9);
+        final Integer constant = Integer.valueOf(9);
         final Factory<Integer> factory = FactoryUtils.constantFactory(constant);
         assertNotNull(factory);
         final Integer created = factory.create();
@@ -160,7 +160,7 @@ public class FactoryUtilsTest extends ju
     }
 
     public void testPrototypeFactoryPublicSerialization() throws Exception {
-        final Integer proto = new Integer(9);
+        final Integer proto = Integer.valueOf(9);
         final Factory<Integer> factory = FactoryUtils.prototypeFactory(proto);
         assertNotNull(factory);
         final Integer created = factory.create();
@@ -284,7 +284,7 @@ public class FactoryUtilsTest extends ju
         // 2nd Jan 1970
         final Factory<Date> factory = FactoryUtils.instantiateFactory(Date.class,
             new Class[] {Integer.TYPE, Integer.TYPE, Integer.TYPE},
-            new Object[] {new Integer(70), new Integer(0), new Integer(2)});
+            new Object[] {Integer.valueOf(70), Integer.valueOf(0), Integer.valueOf(2)});
         assertNotNull(factory);
         final Date created = factory.create();
         // long time of 1 day (== 2nd Jan 1970)

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/IteratorUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/IteratorUtilsTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/IteratorUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/IteratorUtilsTest.java Sun Apr 28 23:15:54 2013
@@ -124,7 +124,7 @@ public class IteratorUtilsTest extends B
     
     public void testToList() {
         final List<Object> list = new ArrayList<Object>();
-        list.add(new Integer(1));
+        list.add(Integer.valueOf(1));
         list.add("Two");
         list.add(null);
         final List<Object> result = IteratorUtils.toList(list.iterator());
@@ -133,7 +133,7 @@ public class IteratorUtilsTest extends B
 
     public void testToArray() {
         final List<Object> list = new ArrayList<Object>();
-        list.add(new Integer(1));
+        list.add(Integer.valueOf(1));
         list.add("Two");
         list.add(null);
         final Object[] result = IteratorUtils.toArray(list.iterator());
@@ -158,7 +158,7 @@ public class IteratorUtilsTest extends B
         assertTrue(iterator.next().equals("a"));
 
         try {
-            iterator = IteratorUtils.arrayIterator(new Integer(0));
+            iterator = IteratorUtils.arrayIterator(Integer.valueOf(0));
             fail("Expecting IllegalArgumentException");
         } catch (final IllegalArgumentException ex) {
                 // expected
@@ -218,13 +218,13 @@ public class IteratorUtilsTest extends B
 
         final int[] intArray = {0, 1, 2};
         iterator = IteratorUtils.arrayIterator(intArray);
-        assertTrue(iterator.next().equals(new Integer(0)));
-        assertTrue(iterator.next().equals(new Integer(1)));
+        assertTrue(iterator.next().equals(Integer.valueOf(0)));
+        assertTrue(iterator.next().equals(Integer.valueOf(1)));
         iterator.reset();
-        assertTrue(iterator.next().equals(new Integer(0)));
+        assertTrue(iterator.next().equals(Integer.valueOf(0)));
 
         iterator = IteratorUtils.arrayIterator(intArray, 1);
-        assertTrue(iterator.next().equals(new Integer(1)));
+        assertTrue(iterator.next().equals(Integer.valueOf(1)));
 
         try {
             iterator = IteratorUtils.arrayIterator(intArray, -1);
@@ -245,7 +245,7 @@ public class IteratorUtilsTest extends B
         }
 
         iterator = IteratorUtils.arrayIterator(intArray, 2, 3);
-        assertTrue(iterator.next().equals(new Integer(2)));
+        assertTrue(iterator.next().equals(Integer.valueOf(2)));
 
         try {
             iterator = IteratorUtils.arrayIterator(intArray, 2, 4);
@@ -287,7 +287,7 @@ public class IteratorUtilsTest extends B
         assertTrue(iterator.previousIndex() == 3);
 
         try {
-            iterator = IteratorUtils.arrayListIterator(new Integer(0));
+            iterator = IteratorUtils.arrayListIterator(Integer.valueOf(0));
             fail("Expecting IllegalArgumentException");
         } catch (final IllegalArgumentException ex) {
                 // expected
@@ -359,28 +359,28 @@ public class IteratorUtilsTest extends B
         assertTrue(iterator.previousIndex() == -1);
         assertTrue(!iterator.hasPrevious());
         assertTrue(iterator.nextIndex() == 0);
-        assertTrue(iterator.next().equals(new Integer(0)));
+        assertTrue(iterator.next().equals(Integer.valueOf(0)));
         assertTrue(iterator.previousIndex() == 0);
         assertTrue(iterator.nextIndex() == 1);
-        assertTrue(iterator.next().equals(new Integer(1)));
+        assertTrue(iterator.next().equals(Integer.valueOf(1)));
         assertTrue(iterator.previousIndex() == 1);
         assertTrue(iterator.nextIndex() == 2);
-        assertTrue(iterator.previous().equals(new Integer(1)));
-        assertTrue(iterator.next().equals(new Integer(1)));
+        assertTrue(iterator.previous().equals(Integer.valueOf(1)));
+        assertTrue(iterator.next().equals(Integer.valueOf(1)));
 
         iterator = IteratorUtils.arrayListIterator(intArray, 1);
         assertTrue(iterator.previousIndex() == -1);
         assertTrue(!iterator.hasPrevious());
         assertTrue(iterator.nextIndex() == 0);
-        assertTrue(iterator.next().equals(new Integer(1)));
-        assertTrue(iterator.previous().equals(new Integer(1)));
-        assertTrue(iterator.next().equals(new Integer(1)));
+        assertTrue(iterator.next().equals(Integer.valueOf(1)));
+        assertTrue(iterator.previous().equals(Integer.valueOf(1)));
+        assertTrue(iterator.next().equals(Integer.valueOf(1)));
         assertTrue(iterator.previousIndex() == 0);
         assertTrue(iterator.nextIndex() == 1);
-        assertTrue(iterator.next().equals(new Integer(2)));
+        assertTrue(iterator.next().equals(Integer.valueOf(2)));
         assertTrue(iterator.previousIndex() == 1);
         assertTrue(iterator.nextIndex() == 2);
-        assertTrue(iterator.previous().equals(new Integer(2)));
+        assertTrue(iterator.previous().equals(Integer.valueOf(2)));
         assertTrue(iterator.previousIndex() == 0);
         assertTrue(iterator.nextIndex() == 1);
 
@@ -404,7 +404,7 @@ public class IteratorUtilsTest extends B
         iterator = IteratorUtils.arrayListIterator(intArray, 2, 3);
         assertTrue(!iterator.hasPrevious());
         assertTrue(iterator.previousIndex() == -1);
-        assertTrue(iterator.next().equals(new Integer(2)));
+        assertTrue(iterator.next().equals(Integer.valueOf(2)));
         assertTrue(iterator.hasPrevious());
         assertTrue(!iterator.hasNext());
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/ListUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/ListUtilsTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/ListUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/ListUtilsTest.java Sun Apr 28 23:15:54 2013
@@ -157,7 +157,7 @@ public class ListUtilsTest extends BulkT
 
             public Integer create() {
                 index++;
-                return new Integer(index);
+                return Integer.valueOf(index);
             }
         });
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/MapUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/MapUtilsTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/MapUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/MapUtilsTest.java Sun Apr 28 23:15:54 2013
@@ -85,7 +85,7 @@ public class MapUtilsTest extends BulkTe
     }
 
     public void testLazyMapFactory() {
-        final Factory<Integer> factory = FactoryUtils.constantFactory(new Integer(5));
+        final Factory<Integer> factory = FactoryUtils.constantFactory(Integer.valueOf(5));
         Map<Object, Object> map = MapUtils.lazyMap(new HashMap<Object, Object>(), factory);
         assertTrue(map instanceof LazyMap);
         try {
@@ -121,7 +121,7 @@ public class MapUtilsTest extends BulkTe
         final Map<Object, Object> map = MapUtils.lazyMap(new HashMap<Object, Object>(), new Transformer<Object, Object>() {
             public Object transform(final Object mapKey) {
                 if (mapKey instanceof String) {
-                    return new Integer((String) mapKey);
+                    return Integer.valueOf((String) mapKey);
                 }
                 return null;
             }
@@ -129,10 +129,10 @@ public class MapUtilsTest extends BulkTe
 
         assertEquals(0, map.size());
         final Integer i1 = (Integer) map.get("5");
-        assertEquals(new Integer(5), i1);
+        assertEquals(Integer.valueOf(5), i1);
         assertEquals(1, map.size());
         final Integer i2 = (Integer) map.get(new String(new char[] {'5'}));
-        assertEquals(new Integer(5), i2);
+        assertEquals(Integer.valueOf(5), i2);
         assertEquals(1, map.size());
         assertSame(i1, i2);
     }
@@ -772,10 +772,10 @@ public class MapUtilsTest extends BulkTe
         assertEquals(list.size(), map.size());
 
         for (int i = 0; i < list.size(); i++) {
-            assertEquals(true, map.containsKey(new Integer(list.get(i))));
+            assertEquals(true, map.containsKey(Integer.valueOf(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(list.get(i))));
+            assertEquals(list.get(i), map.get(Integer.valueOf(list.get(i))));
         }
 
         // Now test both Key-Value transform population
@@ -784,10 +784,10 @@ public class MapUtilsTest extends BulkTe
 
         assertEquals(list.size(), map.size());
         for (int i = 0; i < list.size(); i++) {
-            assertEquals(true, map.containsKey(new Integer(list.get(i))));
+            assertEquals(true, map.containsKey(Integer.valueOf(list.get(i))));
             assertEquals(false, map.containsKey(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))));
+            assertEquals(true, map.containsValue(Integer.valueOf(list.get(i))));
+            assertEquals(Integer.valueOf(list.get(i)), map.get(Integer.valueOf(list.get(i))));
         }
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/PredicateUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/PredicateUtilsTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/PredicateUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/PredicateUtilsTest.java Sun Apr 28 23:15:54 2013
@@ -100,11 +100,11 @@ public class PredicateUtilsTest extends 
 
     @Test public void testIdentityPredicate() {
         assertSame(nullPredicate(), PredicateUtils.identityPredicate(null));
-        assertNotNull(PredicateUtils.identityPredicate(new Integer(6)));
-        assertEquals(false, PredicateUtils.identityPredicate(new Integer(6)).evaluate(null));
-        assertEquals(false, PredicateUtils.<Object>identityPredicate(new Integer(6)).evaluate(cObject));
-        assertEquals(false, PredicateUtils.<Object>identityPredicate(new Integer(6)).evaluate(cString));
-        assertEquals(false, PredicateUtils.identityPredicate(new Integer(6)).evaluate(cInteger));
+        assertNotNull(PredicateUtils.identityPredicate(Integer.valueOf(6)));
+        assertEquals(false, PredicateUtils.identityPredicate(Integer.valueOf(6)).evaluate(null));
+        assertEquals(false, PredicateUtils.<Object>identityPredicate(Integer.valueOf(6)).evaluate(cObject));
+        assertEquals(false, PredicateUtils.<Object>identityPredicate(Integer.valueOf(6)).evaluate(cString));
+        assertEquals(false, PredicateUtils.identityPredicate(Integer.valueOf(6)).evaluate(cInteger));
         assertEquals(true, PredicateUtils.identityPredicate(cInteger).evaluate(cInteger));
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/TransformerUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/TransformerUtilsTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/TransformerUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/TransformerUtilsTest.java Sun Apr 28 23:15:54 2013
@@ -51,7 +51,7 @@ public class TransformerUtilsTest extend
 
     private static final Object cObject = new Object();
     private static final Object cString = "Hello";
-    private static final Object cInteger = new Integer(6);
+    private static final Object cInteger = Integer.valueOf(6);
 
     /**
      * Construct
@@ -150,9 +150,9 @@ public class TransformerUtilsTest extend
         map.put(null, 0);
         map.put(cObject, 1);
         map.put(cString, 2);
-        assertEquals(new Integer(0), TransformerUtils.mapTransformer(map).transform(null));
-        assertEquals(new Integer(1), TransformerUtils.mapTransformer(map).transform(cObject));
-        assertEquals(new Integer(2), TransformerUtils.mapTransformer(map).transform(cString));
+        assertEquals(Integer.valueOf(0), TransformerUtils.mapTransformer(map).transform(null));
+        assertEquals(Integer.valueOf(1), TransformerUtils.mapTransformer(map).transform(cObject));
+        assertEquals(Integer.valueOf(2), TransformerUtils.mapTransformer(map).transform(cString));
         assertEquals(null, TransformerUtils.mapTransformer(map).transform(cInteger));
         assertSame(ConstantTransformer.NULL_INSTANCE, TransformerUtils.mapTransformer(null));
     }
@@ -347,9 +347,9 @@ public class TransformerUtilsTest extend
 
     public void testInvokerTransformer() {
         final List<Object> list = new ArrayList<Object>();
-        assertEquals(new Integer(0), TransformerUtils.invokerTransformer("size").transform(list));
+        assertEquals(Integer.valueOf(0), TransformerUtils.invokerTransformer("size").transform(list));
         list.add(new Object());
-        assertEquals(new Integer(1), TransformerUtils.invokerTransformer("size").transform(list));
+        assertEquals(Integer.valueOf(1), TransformerUtils.invokerTransformer("size").transform(list));
         assertEquals(null, TransformerUtils.invokerTransformer("size").transform(null));
 
         try {
@@ -407,7 +407,7 @@ public class TransformerUtilsTest extend
         assertEquals( "StringValueTransformer should return \"null\" when given a null argument.", "null",
             TransformerUtils.stringValueTransformer().transform(null));
         assertEquals( "StringValueTransformer should return toString value", "6",
-            TransformerUtils.stringValueTransformer().transform(new Integer(6)));
+            TransformerUtils.stringValueTransformer().transform(Integer.valueOf(6)));
     }
 
     // instantiateFactory

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/PredicatedBagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/PredicatedBagTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/PredicatedBagTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/PredicatedBagTest.java Sun Apr 28 23:15:54 2013
@@ -85,7 +85,7 @@ public class PredicatedBagTest<T> extend
     @SuppressWarnings("unchecked")
     public void testIllegalAdd() {
         final Bag<T> bag = makeTestBag();
-        final Integer i = new Integer(3);
+        final Integer i = Integer.valueOf(3);
         try {
             bag.add((T) i);
             fail("Integer should fail string predicate.");
@@ -101,7 +101,7 @@ public class PredicatedBagTest<T> extend
         final HashBag<Object> elements = new HashBag<Object>();
         elements.add("one");
         elements.add("two");
-        elements.add(new Integer(3));
+        elements.add(Integer.valueOf(3));
         elements.add("four");
         try {
             decorateBag((HashBag<T>) elements, stringPredicate());

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TransformedBagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TransformedBagTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TransformedBagTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TransformedBagTest.java Sun Apr 28 23:15:54 2013
@@ -52,12 +52,12 @@ public class TransformedBagTest<T> exten
         for (int i = 0; i < els.length; i++) {
             bag.add((T) els[i]);
             assertEquals(i + 1, bag.size());
-            assertEquals(true, bag.contains(new Integer((String) els[i])));
+            assertEquals(true, bag.contains(Integer.valueOf((String) els[i])));
             assertEquals(false, bag.contains(els[i]));
         }
 
         assertEquals(false, bag.remove(els[0]));
-        assertEquals(true, bag.remove(new Integer((String) els[0])));
+        assertEquals(true, bag.remove(Integer.valueOf((String) els[0])));
     }
 
     @SuppressWarnings("unchecked")
@@ -71,12 +71,12 @@ public class TransformedBagTest<T> exten
                 (Transformer<T, T>) TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER);
         assertEquals(els.length, bag.size());
         for (final Object el : els) {
-            assertEquals(true, bag.contains(new Integer((String) el)));
+            assertEquals(true, bag.contains(Integer.valueOf((String) el)));
             assertEquals(false, bag.contains(el));
         }
         
         assertEquals(false, bag.remove(els[0]));
-        assertEquals(true, bag.remove(new Integer((String) els[0])));
+        assertEquals(true, bag.remove(Integer.valueOf((String) els[0])));
     }
 
     @Override

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TransformedSortedBagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TransformedSortedBagTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TransformedSortedBagTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/TransformedSortedBagTest.java Sun Apr 28 23:15:54 2013
@@ -51,10 +51,10 @@ public class TransformedSortedBagTest<T>
         for (int i = 0; i < els.length; i++) {
             bag.add((T) els[i]);
             assertEquals(i + 1, bag.size());
-            assertEquals(true, bag.contains(new Integer((String) els[i])));
+            assertEquals(true, bag.contains(Integer.valueOf((String) els[i])));
         }
 
-        assertEquals(true, bag.remove(new Integer((String) els[0])));
+        assertEquals(true, bag.remove(Integer.valueOf((String) els[0])));
 
     }
 
@@ -67,10 +67,10 @@ public class TransformedSortedBagTest<T>
         final Bag<?> bag = TransformedBag.transformedBag(originalBag, TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER);
         assertEquals(els.length, bag.size());
         for (final Object el : els) {
-            assertEquals(true, bag.contains(new Integer((String) el)));
+            assertEquals(true, bag.contains(Integer.valueOf((String) el)));
         }
         
-        assertEquals(true, bag.remove(new Integer((String) els[0])));
+        assertEquals(true, bag.remove(Integer.valueOf((String) els[0])));
     }
 
     @Override

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java Sun Apr 28 23:15:54 2013
@@ -426,16 +426,16 @@ public abstract class AbstractCollection
         return (E[]) new Object[] {
             new String(""),
             new String("One"),
-            new Integer(2),
+            Integer.valueOf(2),
             "Three",
-            new Integer(4),
+            Integer.valueOf(4),
             "One",
             new Double(5),
             new Float(6),
             "Seven",
             "Eight",
             new String("Nine"),
-            new Integer(10),
+            Integer.valueOf(10),
             new Short((short)11),
             new Long(12),
             "Thirteen",
@@ -453,7 +453,7 @@ public abstract class AbstractCollection
     @SuppressWarnings("unchecked")
     public E[] getOtherNonNullElements() {
         return (E[]) new Object[] {
-            new Integer(0),
+            Integer.valueOf(0),
             new Float(0),
             new Double(0),
             "Zero",

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/PredicatedCollectionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/PredicatedCollectionTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/PredicatedCollectionTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/PredicatedCollectionTest.java Sun Apr 28 23:15:54 2013
@@ -91,7 +91,7 @@ public class PredicatedCollectionTest<E>
     @SuppressWarnings("unchecked")
     public void testIllegalAdd() {
         final Collection<E> c = makeTestCollection();
-        final Integer i = new Integer(3);
+        final Integer i = Integer.valueOf(3);
         try {
             c.add((E) i);
             fail("Integer should fail string predicate.");
@@ -108,7 +108,7 @@ public class PredicatedCollectionTest<E>
         final List<E> elements = new ArrayList<E>();
         elements.add((E) "one");
         elements.add((E) "two");
-        elements.add((E) new Integer(3));
+        elements.add((E) Integer.valueOf(3));
         elements.add((E) "four");
         try {
             c.addAll(elements);
@@ -118,7 +118,7 @@ public class PredicatedCollectionTest<E>
         }
         assertTrue("Collection shouldn't contain illegal element", !c.contains("one"));
         assertTrue("Collection shouldn't contain illegal element", !c.contains("two"));
-        assertTrue("Collection shouldn't contain illegal element", !c.contains(new Integer(3)));
+        assertTrue("Collection shouldn't contain illegal element", !c.contains(Integer.valueOf(3)));
         assertTrue("Collection shouldn't contain illegal element", !c.contains("four"));
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/TransformedCollectionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/TransformedCollectionTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/TransformedCollectionTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/TransformedCollectionTest.java Sun Apr 28 23:15:54 2013
@@ -36,7 +36,7 @@ public class TransformedCollectionTest e
     
     private static class StringToInteger implements Transformer<Object, Object> {
         public Object transform(final Object input) {
-            return new Integer((String) input);
+            return Integer.valueOf((String) input);
         }
     }
     
@@ -91,11 +91,11 @@ public class TransformedCollectionTest e
         for (int i = 0; i < els.length; i++) {
             coll.add(els[i]);
             assertEquals(i + 1, coll.size());
-            assertEquals(true, coll.contains(new Integer((String) els[i])));
+            assertEquals(true, coll.contains(Integer.valueOf((String) els[i])));
             assertEquals(false, coll.contains(els[i]));
         }
         
-        assertEquals(true, coll.remove(new Integer((String) els[0])));
+        assertEquals(true, coll.remove(Integer.valueOf((String) els[0])));
     }
 
     public void testTransformedCollection_decorateTransform() {
@@ -107,12 +107,12 @@ public class TransformedCollectionTest e
         final Collection<Object> collection = TransformedCollection.transformedCollection(originalCollection, TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER);
         assertEquals(els.length, collection.size());
         for (final Object el : els) {
-            assertEquals(true, collection.contains(new Integer((String) el)));
+            assertEquals(true, collection.contains(Integer.valueOf((String) el)));
             assertEquals(false, collection.contains(el));
         }
         
         assertEquals(false, collection.remove(els[0]));
-        assertEquals(true, collection.remove(new Integer((String) els[0])));
+        assertEquals(true, collection.remove(Integer.valueOf((String) els[0])));
     }
 
     @Override

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/AbstractNullComparatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/AbstractNullComparatorTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/AbstractNullComparatorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/AbstractNullComparatorTest.java Sun Apr 28 23:15:54 2013
@@ -60,11 +60,11 @@ public abstract class AbstractNullCompar
         @Override
         public List<Integer> getComparableObjectsOrdered() {
             final List<Integer> list = new LinkedList<Integer>();
-            list.add(new Integer(1));
-            list.add(new Integer(2));
-            list.add(new Integer(3));
-            list.add(new Integer(4));
-            list.add(new Integer(5));
+            list.add(Integer.valueOf(1));
+            list.add(Integer.valueOf(2));
+            list.add(Integer.valueOf(3));
+            list.add(Integer.valueOf(4));
+            list.add(Integer.valueOf(5));
             list.add(null);
             return list;
         }
@@ -103,11 +103,11 @@ public abstract class AbstractNullCompar
         public List<Integer> getComparableObjectsOrdered() {
             final List<Integer> list = new LinkedList<Integer>();
             list.add(null);
-            list.add(new Integer(1));
-            list.add(new Integer(2));
-            list.add(new Integer(3));
-            list.add(new Integer(4));
-            list.add(new Integer(5));
+            list.add(Integer.valueOf(1));
+            list.add(Integer.valueOf(2));
+            list.add(Integer.valueOf(3));
+            list.add(Integer.valueOf(4));
+            list.add(Integer.valueOf(5));
             return list;
         }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/ComparatorChainTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/ComparatorChainTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/ComparatorChainTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/ComparatorChainTest.java Sun Apr 28 23:15:54 2013
@@ -56,8 +56,8 @@ public class ComparatorChainTest extends
     @Test
     public void testNoopComparatorChain() {
         final ComparatorChain<Integer> chain = new ComparatorChain<Integer>();
-        final Integer i1 = new Integer(4);
-        final Integer i2 = new Integer(6);
+        final Integer i1 = Integer.valueOf(4);
+        final Integer i2 = Integer.valueOf(6);
         chain.addComparator(new ComparableComparator<Integer>());
 
         final int correctValue = i1.compareTo(i2);
@@ -67,8 +67,8 @@ public class ComparatorChainTest extends
     @Test
     public void testBadNoopComparatorChain() {
         final ComparatorChain<Integer> chain = new ComparatorChain<Integer>();
-        final Integer i1 = new Integer(4);
-        final Integer i2 = new Integer(6);
+        final Integer i1 = Integer.valueOf(4);
+        final Integer i2 = Integer.valueOf(6);
         try {
             chain.compare(i1,i2);
             fail("An exception should be thrown when a chain contains zero comparators.");
@@ -81,8 +81,8 @@ public class ComparatorChainTest extends
         final List<Comparator<Integer>> list = new LinkedList<Comparator<Integer>>();
         list.add(new ComparableComparator<Integer>());
         final ComparatorChain<Integer> chain = new ComparatorChain<Integer>(list);
-        final Integer i1 = new Integer(4);
-        final Integer i2 = new Integer(6);
+        final Integer i1 = Integer.valueOf(4);
+        final Integer i2 = Integer.valueOf(6);
 
         final int correctValue = i1.compareTo(i2);
         assertTrue("Comparison returns the right order", chain.compare(i1, i2) == correctValue);
@@ -92,8 +92,8 @@ public class ComparatorChainTest extends
     public void testBadListComparatorChain() {
         final List<Comparator<Integer>> list = new LinkedList<Comparator<Integer>>();
         final ComparatorChain<Integer> chain = new ComparatorChain<Integer>(list);
-        final Integer i1 = new Integer(4);
-        final Integer i2 = new Integer(6);
+        final Integer i1 = Integer.valueOf(4);
+        final Integer i2 = Integer.valueOf(6);
         try {
             chain.compare(i1, i2);
             fail("An exception should be thrown when a chain contains zero comparators.");
@@ -119,9 +119,9 @@ public class ComparatorChainTest extends
             }
         }, true);
 
-        assertTrue(chain.compare(new Integer(4), new Integer(5)) > 0);
-        assertTrue(chain.compare(new Integer(5), new Integer(4)) < 0);
-        assertTrue(chain.compare(new Integer(4), new Integer(4)) == 0);
+        assertTrue(chain.compare(Integer.valueOf(4), Integer.valueOf(5)) > 0);
+        assertTrue(chain.compare(Integer.valueOf(5), Integer.valueOf(4)) < 0);
+        assertTrue(chain.compare(Integer.valueOf(4), Integer.valueOf(4)) == 0);
     }
 
     @Override

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/ReverseComparatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/ReverseComparatorTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/ReverseComparatorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/comparators/ReverseComparatorTest.java Sun Apr 28 23:15:54 2013
@@ -67,11 +67,11 @@ public class ReverseComparatorTest exten
     @Override
     public List<Integer> getComparableObjectsOrdered() {
         final List<Integer> list = new LinkedList<Integer>();
-        list.add(new Integer(1));
-        list.add(new Integer(2));
-        list.add(new Integer(3));
-        list.add(new Integer(4));
-        list.add(new Integer(5));
+        list.add(Integer.valueOf(1));
+        list.add(Integer.valueOf(2));
+        list.add(Integer.valueOf(3));
+        list.add(Integer.valueOf(4));
+        list.add(Integer.valueOf(5));
         return list;
     }
 

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AbstractPredicateTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AbstractPredicateTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AbstractPredicateTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AbstractPredicateTest.java Sun Apr 28 23:15:54 2013
@@ -30,7 +30,7 @@ public abstract class AbstractPredicateT
     public void initialiseTestObjects() throws Exception {
         cObject = new Object();
         cString = "Hello";
-        cInteger = new Integer(6);
+        cInteger = Integer.valueOf(6);
     }
     
     @Test

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/ArrayIterator2Test.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/ArrayIterator2Test.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/ArrayIterator2Test.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/ArrayIterator2Test.java Sun Apr 28 23:15:54 2013
@@ -64,7 +64,7 @@ public class ArrayIterator2Test<E> exten
     public void testIterator() {
         final Iterator<E> iter = makeObject();
         for (final int element : testArray) {
-            final Integer testValue = new Integer(element);
+            final Integer testValue = Integer.valueOf(element);
             final Number iterValue = (Number) iter.next();
 
             assertEquals("Iteration value is correct", testValue, iterValue);

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/CollatingIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/CollatingIteratorTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/CollatingIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/CollatingIteratorTest.java Sun Apr 28 23:15:54 2013
@@ -111,7 +111,7 @@ public class CollatingIteratorTest exten
         final CollatingIterator<Integer> iter = new CollatingIterator<Integer>(comparator, evens.iterator(), odds.iterator());
         for (int i = 0; i < 20; i++) {
             assertTrue(iter.hasNext());
-            assertEquals(new Integer(i), iter.next());
+            assertEquals(Integer.valueOf(i), iter.next());
             assertEquals(i % 2,iter.getIteratorIndex());
         }
         assertTrue(!iter.hasNext());
@@ -121,7 +121,7 @@ public class CollatingIteratorTest exten
         final CollatingIterator<Integer> iter = new CollatingIterator<Integer>(comparator, odds.iterator(), evens.iterator());
         for (int i = 0; i < 20; i++) {
             assertTrue(iter.hasNext());
-            assertEquals(new Integer(i),iter.next());
+            assertEquals(Integer.valueOf(i),iter.next());
             assertEquals(i % 2 == 0 ? 1 : 0,iter.getIteratorIndex());
         }
         assertTrue(!iter.hasNext());
@@ -148,61 +148,61 @@ public class CollatingIteratorTest exten
         iter.addIterator(evens.iterator());
         iter.addIterator(odds.iterator());
 
-        assertEquals(new Integer(0),iter.next());  // even   0
+        assertEquals(Integer.valueOf(0),iter.next());  // even   0
         assertEquals(1,iter.getIteratorIndex());
-        assertEquals(new Integer(1),iter.next());  // fib    1
+        assertEquals(Integer.valueOf(1),iter.next());  // fib    1
         assertEquals(0,iter.getIteratorIndex());
-        assertEquals(new Integer(1),iter.next());  // fib    1
+        assertEquals(Integer.valueOf(1),iter.next());  // fib    1
         assertEquals(0,iter.getIteratorIndex());
-        assertEquals(new Integer(1),iter.next());  // odd    1
+        assertEquals(Integer.valueOf(1),iter.next());  // odd    1
         assertEquals(2,iter.getIteratorIndex());
-        assertEquals(new Integer(2),iter.next());  // fib    2
+        assertEquals(Integer.valueOf(2),iter.next());  // fib    2
         assertEquals(0,iter.getIteratorIndex());
-        assertEquals(new Integer(2),iter.next());  // even   2
+        assertEquals(Integer.valueOf(2),iter.next());  // even   2
         assertEquals(1,iter.getIteratorIndex());
-        assertEquals(new Integer(3),iter.next());  // fib    3
+        assertEquals(Integer.valueOf(3),iter.next());  // fib    3
         assertEquals(0,iter.getIteratorIndex());
-        assertEquals(new Integer(3),iter.next());  // odd    3
+        assertEquals(Integer.valueOf(3),iter.next());  // odd    3
         assertEquals(2,iter.getIteratorIndex());
-        assertEquals(new Integer(4),iter.next());  // even   4
+        assertEquals(Integer.valueOf(4),iter.next());  // even   4
         assertEquals(1,iter.getIteratorIndex());
-        assertEquals(new Integer(5),iter.next());  // fib    5
+        assertEquals(Integer.valueOf(5),iter.next());  // fib    5
         assertEquals(0,iter.getIteratorIndex());
-        assertEquals(new Integer(5),iter.next());  // odd    5
+        assertEquals(Integer.valueOf(5),iter.next());  // odd    5
         assertEquals(2,iter.getIteratorIndex());
-        assertEquals(new Integer(6),iter.next());  // even   6
+        assertEquals(Integer.valueOf(6),iter.next());  // even   6
         assertEquals(1,iter.getIteratorIndex());
-        assertEquals(new Integer(7),iter.next());  // odd    7
+        assertEquals(Integer.valueOf(7),iter.next());  // odd    7
         assertEquals(2,iter.getIteratorIndex());
-        assertEquals(new Integer(8),iter.next());  // fib    8
+        assertEquals(Integer.valueOf(8),iter.next());  // fib    8
         assertEquals(0,iter.getIteratorIndex());
-        assertEquals(new Integer(8),iter.next());  // even   8
+        assertEquals(Integer.valueOf(8),iter.next());  // even   8
         assertEquals(1,iter.getIteratorIndex());
-        assertEquals(new Integer(9),iter.next());  // odd    9
+        assertEquals(Integer.valueOf(9),iter.next());  // odd    9
         assertEquals(2,iter.getIteratorIndex());
-        assertEquals(new Integer(10),iter.next()); // even  10
+        assertEquals(Integer.valueOf(10),iter.next()); // even  10
         assertEquals(1,iter.getIteratorIndex());
-        assertEquals(new Integer(11),iter.next()); // odd   11
+        assertEquals(Integer.valueOf(11),iter.next()); // odd   11
         assertEquals(2,iter.getIteratorIndex());
-        assertEquals(new Integer(12),iter.next()); // even  12
+        assertEquals(Integer.valueOf(12),iter.next()); // even  12
         assertEquals(1,iter.getIteratorIndex());
-        assertEquals(new Integer(13),iter.next()); // fib   13
+        assertEquals(Integer.valueOf(13),iter.next()); // fib   13
         assertEquals(0,iter.getIteratorIndex());
-        assertEquals(new Integer(13),iter.next()); // odd   13
+        assertEquals(Integer.valueOf(13),iter.next()); // odd   13
         assertEquals(2,iter.getIteratorIndex());
-        assertEquals(new Integer(14),iter.next()); // even  14
+        assertEquals(Integer.valueOf(14),iter.next()); // even  14
         assertEquals(1,iter.getIteratorIndex());
-        assertEquals(new Integer(15),iter.next()); // odd   15
+        assertEquals(Integer.valueOf(15),iter.next()); // odd   15
         assertEquals(2,iter.getIteratorIndex());
-        assertEquals(new Integer(16),iter.next()); // even  16
+        assertEquals(Integer.valueOf(16),iter.next()); // even  16
         assertEquals(1,iter.getIteratorIndex());
-        assertEquals(new Integer(17),iter.next()); // odd   17
+        assertEquals(Integer.valueOf(17),iter.next()); // odd   17
         assertEquals(2,iter.getIteratorIndex());
-        assertEquals(new Integer(18),iter.next()); // even  18
+        assertEquals(Integer.valueOf(18),iter.next()); // even  18
         assertEquals(1,iter.getIteratorIndex());
-        assertEquals(new Integer(19),iter.next()); // odd   19
+        assertEquals(Integer.valueOf(19),iter.next()); // odd   19
         assertEquals(2,iter.getIteratorIndex());
-        assertEquals(new Integer(21),iter.next()); // fib   21
+        assertEquals(Integer.valueOf(21),iter.next()); // fib   21
         assertEquals(0,iter.getIteratorIndex());
 
         assertTrue(!iter.hasNext());

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/FilterListIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/FilterListIteratorTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/FilterListIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/FilterListIteratorTest.java Sun Apr 28 23:15:54 2013
@@ -63,12 +63,12 @@ public class FilterListIteratorTest exte
         fours = new ArrayList<Integer>();
         sixes = new ArrayList<Integer>();
         for (int i = 0; i < 20; i++) {
-            list.add(new Integer(i));
-            if (i % 2 == 0) { evens.add(new Integer(i)); }
-            if (i % 2 == 1) { odds.add(new Integer(i)); }
-            if (i % 3 == 0) { threes.add(new Integer(i)); }
-            if (i % 4 == 0) { fours.add(new Integer(i)); }
-            if (i % 6 == 0) { sixes.add(new Integer(i)); }
+            list.add(Integer.valueOf(i));
+            if (i % 2 == 0) { evens.add(Integer.valueOf(i)); }
+            if (i % 2 == 1) { odds.add(Integer.valueOf(i)); }
+            if (i % 3 == 0) { threes.add(Integer.valueOf(i)); }
+            if (i % 4 == 0) { fours.add(Integer.valueOf(i)); }
+            if (i % 6 == 0) { sixes.add(Integer.valueOf(i)); }
         }
 
         truePred = new Predicate<Integer>() {
@@ -134,59 +134,59 @@ public class FilterListIteratorTest exte
         // do this one "by hand" as a sanity check
         final FilterListIterator<Integer> filtered = new FilterListIterator<Integer>(list.listIterator(), threePred);
         
-        assertEquals(new Integer(0), filtered.next());
-        assertEquals(new Integer(3), filtered.next());
-        assertEquals(new Integer(6), filtered.next());
-        assertEquals(new Integer(9), filtered.next());
-        assertEquals(new Integer(12), filtered.next());
-        assertEquals(new Integer(15), filtered.next());
-        assertEquals(new Integer(18), filtered.next());
-
-        assertEquals(new Integer(18), filtered.previous());
-        assertEquals(new Integer(15), filtered.previous());
-        assertEquals(new Integer(12), filtered.previous());
-        assertEquals(new Integer(9), filtered.previous());
-        assertEquals(new Integer(6), filtered.previous());
-        assertEquals(new Integer(3), filtered.previous());
-        assertEquals(new Integer(0), filtered.previous());
+        assertEquals(Integer.valueOf(0), filtered.next());
+        assertEquals(Integer.valueOf(3), filtered.next());
+        assertEquals(Integer.valueOf(6), filtered.next());
+        assertEquals(Integer.valueOf(9), filtered.next());
+        assertEquals(Integer.valueOf(12), filtered.next());
+        assertEquals(Integer.valueOf(15), filtered.next());
+        assertEquals(Integer.valueOf(18), filtered.next());
+
+        assertEquals(Integer.valueOf(18), filtered.previous());
+        assertEquals(Integer.valueOf(15), filtered.previous());
+        assertEquals(Integer.valueOf(12), filtered.previous());
+        assertEquals(Integer.valueOf(9), filtered.previous());
+        assertEquals(Integer.valueOf(6), filtered.previous());
+        assertEquals(Integer.valueOf(3), filtered.previous());
+        assertEquals(Integer.valueOf(0), filtered.previous());
     
         assertTrue(!filtered.hasPrevious());
 
-        assertEquals(new Integer(0), filtered.next());
-        assertEquals(new Integer(3), filtered.next());
-        assertEquals(new Integer(6), filtered.next());
-        assertEquals(new Integer(9), filtered.next());
-        assertEquals(new Integer(12), filtered.next());
-        assertEquals(new Integer(15), filtered.next());
-        assertEquals(new Integer(18), filtered.next());
+        assertEquals(Integer.valueOf(0), filtered.next());
+        assertEquals(Integer.valueOf(3), filtered.next());
+        assertEquals(Integer.valueOf(6), filtered.next());
+        assertEquals(Integer.valueOf(9), filtered.next());
+        assertEquals(Integer.valueOf(12), filtered.next());
+        assertEquals(Integer.valueOf(15), filtered.next());
+        assertEquals(Integer.valueOf(18), filtered.next());
 
         assertTrue(!filtered.hasNext());
 
-        assertEquals(new Integer(18), filtered.previous());
-        assertEquals(new Integer(15), filtered.previous());
-        assertEquals(new Integer(12), filtered.previous());
-        assertEquals(new Integer(9), filtered.previous());
-        assertEquals(new Integer(6), filtered.previous());
-        assertEquals(new Integer(3), filtered.previous());
-        assertEquals(new Integer(0), filtered.previous());
-
-        assertEquals(new Integer(0), filtered.next());
-        assertEquals(new Integer(0), filtered.previous());
-        assertEquals(new Integer(0), filtered.next());
-
-        assertEquals(new Integer(3), filtered.next());
-        assertEquals(new Integer(6), filtered.next());
-        assertEquals(new Integer(6), filtered.previous());
-        assertEquals(new Integer(3), filtered.previous());
-        assertEquals(new Integer(3), filtered.next());
-        assertEquals(new Integer(6), filtered.next());
-
-        assertEquals(new Integer(9), filtered.next());
-        assertEquals(new Integer(12), filtered.next());
-        assertEquals(new Integer(15), filtered.next());
-        assertEquals(new Integer(15), filtered.previous());
-        assertEquals(new Integer(12), filtered.previous());
-        assertEquals(new Integer(9), filtered.previous());
+        assertEquals(Integer.valueOf(18), filtered.previous());
+        assertEquals(Integer.valueOf(15), filtered.previous());
+        assertEquals(Integer.valueOf(12), filtered.previous());
+        assertEquals(Integer.valueOf(9), filtered.previous());
+        assertEquals(Integer.valueOf(6), filtered.previous());
+        assertEquals(Integer.valueOf(3), filtered.previous());
+        assertEquals(Integer.valueOf(0), filtered.previous());
+
+        assertEquals(Integer.valueOf(0), filtered.next());
+        assertEquals(Integer.valueOf(0), filtered.previous());
+        assertEquals(Integer.valueOf(0), filtered.next());
+
+        assertEquals(Integer.valueOf(3), filtered.next());
+        assertEquals(Integer.valueOf(6), filtered.next());
+        assertEquals(Integer.valueOf(6), filtered.previous());
+        assertEquals(Integer.valueOf(3), filtered.previous());
+        assertEquals(Integer.valueOf(3), filtered.next());
+        assertEquals(Integer.valueOf(6), filtered.next());
+
+        assertEquals(Integer.valueOf(9), filtered.next());
+        assertEquals(Integer.valueOf(12), filtered.next());
+        assertEquals(Integer.valueOf(15), filtered.next());
+        assertEquals(Integer.valueOf(15), filtered.previous());
+        assertEquals(Integer.valueOf(12), filtered.previous());
+        assertEquals(Integer.valueOf(9), filtered.previous());
     }
 
     public void testTruePredicate() {

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/IteratorChainTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/IteratorChainTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/IteratorChainTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/IteratorChainTest.java Sun Apr 28 23:15:54 2013
@@ -95,17 +95,17 @@ public class IteratorChainTest extends A
 
         final Predicate<Integer> myPredicate = new Predicate<Integer>() {
             public boolean evaluate(final Integer i) {
-                return i.compareTo(new Integer(4)) < 0;
+                return i.compareTo(Integer.valueOf(4)) < 0;
             }
         };
 
         final List<Integer> list1 = new ArrayList<Integer>();
         final List<Integer> list2 = new ArrayList<Integer>();
 
-        list1.add(new Integer(1));
-        list1.add(new Integer(2));
-        list2.add(new Integer(3));
-        list2.add(new Integer(4)); // will be ignored by the predicate
+        list1.add(Integer.valueOf(1));
+        list1.add(Integer.valueOf(2));
+        list2.add(Integer.valueOf(3));
+        list2.add(Integer.valueOf(4)); // will be ignored by the predicate
 
         final Iterator<Integer> it1 = IteratorUtils.filteredIterator(list1.iterator(), myPredicate);
         final Iterator<Integer> it2 = IteratorUtils.filteredIterator(list2.iterator(), myPredicate);

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/LazyIteratorChainTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/LazyIteratorChainTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/LazyIteratorChainTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/LazyIteratorChainTest.java Sun Apr 28 23:15:54 2013
@@ -109,17 +109,17 @@ public class LazyIteratorChainTest exten
 
         final Predicate<Integer> myPredicate = new Predicate<Integer>() {
             public boolean evaluate(final Integer i) {
-                return i.compareTo(new Integer(4)) < 0;
+                return i.compareTo(Integer.valueOf(4)) < 0;
             }
         };
 
         final List<Integer> list1 = new ArrayList<Integer>();
         final List<Integer> list2 = new ArrayList<Integer>();
 
-        list1.add(new Integer(1));
-        list1.add(new Integer(2));
-        list2.add(new Integer(3));
-        list2.add(new Integer(4)); // will be ignored by the predicate
+        list1.add(Integer.valueOf(1));
+        list1.add(Integer.valueOf(2));
+        list2.add(Integer.valueOf(3));
+        list2.add(Integer.valueOf(4)); // will be ignored by the predicate
 
         final Iterator<Integer> it1 = IteratorUtils.filteredIterator(list1.iterator(), myPredicate);
         final Iterator<Integer> it2 = IteratorUtils.filteredIterator(list2.iterator(), myPredicate);

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/keyvalue/MultiKeyTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/keyvalue/MultiKeyTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/keyvalue/MultiKeyTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/keyvalue/MultiKeyTest.java Sun Apr 28 23:15:54 2013
@@ -37,11 +37,11 @@ import junit.framework.TestCase;
  */
 public class MultiKeyTest extends TestCase {
 
-    Integer ONE = new Integer(1);
-    Integer TWO = new Integer(2);
-    Integer THREE = new Integer(3);
-    Integer FOUR = new Integer(4);
-    Integer FIVE = new Integer(5);
+    Integer ONE = Integer.valueOf(1);
+    Integer TWO = Integer.valueOf(2);
+    Integer THREE = Integer.valueOf(3);
+    Integer FOUR = Integer.valueOf(4);
+    Integer FIVE = Integer.valueOf(5);
 
     public MultiKeyTest(final String name) {
         super(name);

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/AbstractListTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/AbstractListTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/AbstractListTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/AbstractListTest.java Sun Apr 28 23:15:54 2013
@@ -1320,7 +1320,7 @@ public abstract class AbstractListTest<E
        final Object[] params = new Object[types.length];
        for (int i = 0; i < params.length; i++) {
            if (types[i] == Integer.TYPE) {
-            params[i] = new Integer(0);
+            params[i] = Integer.valueOf(0);
         } else if (types[i] == Collection.class) {
             params[i] = c;
         } else if (types[i] == Object.class) {

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/CursorableLinkedListTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/CursorableLinkedListTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/CursorableLinkedListTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/CursorableLinkedListTest.java Sun Apr 28 23:15:54 2013
@@ -58,21 +58,21 @@ public class CursorableLinkedListTest<E>
     @SuppressWarnings("unchecked")
     public void testAdd() {
         assertEquals("[]",list.toString());
-        assertTrue(list.add((E) new Integer(1)));
+        assertTrue(list.add((E) Integer.valueOf(1)));
         assertEquals("[1]",list.toString());
-        assertTrue(list.add((E) new Integer(2)));
+        assertTrue(list.add((E) Integer.valueOf(2)));
         assertEquals("[1, 2]",list.toString());
-        assertTrue(list.add((E) new Integer(3)));
+        assertTrue(list.add((E) Integer.valueOf(3)));
         assertEquals("[1, 2, 3]",list.toString());
-        assertTrue(list.addFirst((E) new Integer(0)));
+        assertTrue(list.addFirst((E) Integer.valueOf(0)));
         assertEquals("[0, 1, 2, 3]",list.toString());
-        assertTrue(list.addLast((E) new Integer(4)));
+        assertTrue(list.addLast((E) Integer.valueOf(4)));
         assertEquals("[0, 1, 2, 3, 4]",list.toString());
-        list.add(0,(E) new Integer(-2));
+        list.add(0,(E) Integer.valueOf(-2));
         assertEquals("[-2, 0, 1, 2, 3, 4]",list.toString());
-        list.add(1,(E) new Integer(-1));
+        list.add(1,(E) Integer.valueOf(-1));
         assertEquals("[-2, -1, 0, 1, 2, 3, 4]",list.toString());
-        list.add(7,(E) new Integer(5));
+        list.add(7,(E) Integer.valueOf(5));
         assertEquals("[-2, -1, 0, 1, 2, 3, 4, 5]",list.toString());
 
         final java.util.List<E> list2 = new java.util.LinkedList<E>();
@@ -112,7 +112,7 @@ public class CursorableLinkedListTest<E>
         assertTrue(list.isEmpty());
 
         for (int i = 0; i < 1000; i++) {
-            list.add((E) new Integer(i));
+            list.add((E) Integer.valueOf(i));
         }
         assertEquals(1000, list.size());
         assertTrue(!list.isEmpty());
@@ -1476,7 +1476,7 @@ public class CursorableLinkedListTest<E>
         // recursive serialization will cause a stack
         // overflow exception with long lists
         for (int i = 0; i < 10000; i++) {
-            list.add((E) new Integer(i));
+            list.add((E) Integer.valueOf(i));
         }
 
         final java.io.ByteArrayOutputStream buf = new java.io.ByteArrayOutputStream();

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/GrowthListTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/GrowthListTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/GrowthListTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/GrowthListTest.java Sun Apr 28 23:15:54 2013
@@ -49,7 +49,7 @@ public class GrowthListTest<E> extends A
 
     //-----------------------------------------------------------------------
     public void testGrowthAdd() {
-        final Integer one = new Integer(1);
+        final Integer one = Integer.valueOf(1);
         final GrowthList<Integer> grower = new GrowthList<Integer>();
         assertEquals(0, grower.size());
         grower.add(1, one);
@@ -59,8 +59,8 @@ public class GrowthListTest<E> extends A
     }
 
     public void testGrowthAddAll() {
-        final Integer one = new Integer(1);
-        final Integer two = new Integer(2);
+        final Integer one = Integer.valueOf(1);
+        final Integer two = Integer.valueOf(2);
         final Collection<Integer> coll = new ArrayList<Integer>();
         coll.add(one);
         coll.add(two);
@@ -74,7 +74,7 @@ public class GrowthListTest<E> extends A
     }
 
     public void testGrowthSet1() {
-        final Integer one = new Integer(1);
+        final Integer one = Integer.valueOf(1);
         final GrowthList<Integer> grower = new GrowthList<Integer>();
         assertEquals(0, grower.size());
         grower.set(1, one);
@@ -84,7 +84,7 @@ public class GrowthListTest<E> extends A
     }
 
     public void testGrowthSet2() {
-        final Integer one = new Integer(1);
+        final Integer one = Integer.valueOf(1);
         final GrowthList<Integer> grower = new GrowthList<Integer>();
         assertEquals(0, grower.size());
         grower.set(0, one);

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/PredicatedListTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/PredicatedListTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/PredicatedListTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/PredicatedListTest.java Sun Apr 28 23:15:54 2013
@@ -71,7 +71,7 @@ public class PredicatedListTest<E> exten
     @SuppressWarnings("unchecked")
     public void testIllegalAdd() {
         final List<E> list = makeTestList();
-        final Integer i = new Integer(3);
+        final Integer i = Integer.valueOf(3);
         try {
             list.add((E) i);
             fail("Integer should fail string predicate.");
@@ -88,7 +88,7 @@ public class PredicatedListTest<E> exten
         final List<E> elements = new ArrayList<E>();
         elements.add((E) "one");
         elements.add((E) "two");
-        elements.add((E) new Integer(3));
+        elements.add((E) Integer.valueOf(3));
         elements.add((E) "four");
         try {
             list.addAll(0, elements);
@@ -101,7 +101,7 @@ public class PredicatedListTest<E> exten
         assertTrue("List shouldn't contain illegal element",
          !list.contains("two"));
         assertTrue("List shouldn't contain illegal element",
-         !list.contains(new Integer(3)));
+         !list.contains(Integer.valueOf(3)));
         assertTrue("List shouldn't contain illegal element",
          !list.contains("four"));
     }
@@ -110,7 +110,7 @@ public class PredicatedListTest<E> exten
     public void testIllegalSet() {
         final List<E> list = makeTestList();
         try {
-            list.set(0, (E) new Integer(3));
+            list.set(0, (E) Integer.valueOf(3));
             fail("Integer should fail string predicate.");
         } catch (final IllegalArgumentException e) {
             // expected

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/SetUniqueListTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/SetUniqueListTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/SetUniqueListTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/SetUniqueListTest.java Sun Apr 28 23:15:54 2013
@@ -63,15 +63,15 @@ public class SetUniqueListTest<E> extend
         return (E[]) new Object[] {
                 new String(""),
                 new String("One"),
-                new Integer(2),
+                Integer.valueOf(2),
                 "Three",
-                new Integer(4),
+                Integer.valueOf(4),
                 new Double(5),
                 new Float(6),
                 "Seven",
                 "Eight",
                 new String("Nine"),
-                new Integer(10),
+                Integer.valueOf(10),
                 new Short((short)11),
                 new Long(12),
                 "Thirteen",
@@ -142,12 +142,12 @@ public class SetUniqueListTest<E> extend
     public void testIntCollectionAddAll() {
       // make a SetUniqueList with one element
       final List<Integer> list = new SetUniqueList<Integer>(new ArrayList<Integer>(), new HashSet<Integer>());
-      final Integer existingElement = new Integer(1);
+      final Integer existingElement = Integer.valueOf(1);
       list.add(existingElement);
 
       // add two new unique elements at index 0
-      final Integer firstNewElement = new Integer(2);
-      final Integer secondNewElement = new Integer(3);
+      final Integer firstNewElement = Integer.valueOf(2);
+      final Integer secondNewElement = Integer.valueOf(3);
       Collection<Integer> collection = Arrays.asList(new Integer[] {firstNewElement, secondNewElement});
       list.addAll(0, collection);
       assertEquals("Unique elements should be added.", 3, list.size());
@@ -156,7 +156,7 @@ public class SetUniqueListTest<E> extend
       assertEquals("Existing element should shift to index 2", existingElement, list.get(2));
 
       // add a duplicate element and a unique element at index 0
-      final Integer thirdNewElement = new Integer(4);
+      final Integer thirdNewElement = Integer.valueOf(4);
       collection = Arrays.asList(new Integer[] {existingElement, thirdNewElement});
       list.addAll(0, collection);
       assertEquals("Duplicate element should not be added, unique element should be added.",
@@ -209,15 +209,15 @@ public class SetUniqueListTest<E> extend
 
     //-----------------------------------------------------------------------
     public void testFactory() {
-        final Integer[] array = new Integer[] { new Integer(1), new Integer(2), new Integer(1) };
+        final Integer[] array = new Integer[] { Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(1) };
         final ArrayList<Integer> list = new ArrayList<Integer>(Arrays.asList(array));
         final SetUniqueList<Integer> lset = SetUniqueList.setUniqueList(list);
 
         assertEquals("Duplicate element was added.", 2, lset.size());
-        assertEquals(new Integer(1), lset.get(0));
-        assertEquals(new Integer(2), lset.get(1));
-        assertEquals(new Integer(1), list.get(0));
-        assertEquals(new Integer(2), list.get(1));
+        assertEquals(Integer.valueOf(1), lset.get(0));
+        assertEquals(Integer.valueOf(2), lset.get(1));
+        assertEquals(Integer.valueOf(1), list.get(0));
+        assertEquals(Integer.valueOf(2), list.get(1));
     }
 
     @SuppressWarnings("unchecked")
@@ -225,13 +225,13 @@ public class SetUniqueListTest<E> extend
         final SetUniqueList<E> lset = new SetUniqueList<E>(new ArrayList<E>(), new HashSet<E>());
 
         // Duplicate element
-        final E obj = (E) new Integer(1);
+        final E obj = (E) Integer.valueOf(1);
         lset.add(obj);
         lset.add(obj);
         assertEquals("Duplicate element was added.", 1, lset.size());
 
         // Unique element
-        lset.add((E) new Integer(2));
+        lset.add((E) Integer.valueOf(2));
         assertEquals("Unique element was not added.", 2, lset.size());
     }
 
@@ -240,7 +240,7 @@ public class SetUniqueListTest<E> extend
         final SetUniqueList<E> lset = new SetUniqueList<E>(new ArrayList<E>(), new HashSet<E>());
 
         lset.addAll(
-            Arrays.asList((E[]) new Integer[] { new Integer(1), new Integer(1)}));
+            Arrays.asList((E[]) new Integer[] { Integer.valueOf(1), Integer.valueOf(1)}));
 
         assertEquals("Duplicate element was added.", 1, lset.size());
     }
@@ -250,9 +250,9 @@ public class SetUniqueListTest<E> extend
         final SetUniqueList<E> lset = new SetUniqueList<E>(new ArrayList<E>(), new HashSet<E>());
 
         // Duplicate element
-        final E obj1 = (E) new Integer(1);
-        final E obj2 = (E) new Integer(2);
-        final E obj3 = (E) new Integer(3);
+        final E obj1 = (E) Integer.valueOf(1);
+        final E obj2 = (E) Integer.valueOf(2);
+        final E obj3 = (E) Integer.valueOf(3);
 
         lset.add(obj1);
         lset.add(obj2);
@@ -288,8 +288,8 @@ public class SetUniqueListTest<E> extend
     public void testListIterator() {
         final SetUniqueList<E> lset = new SetUniqueList<E>(new ArrayList<E>(), new HashSet<E>());
 
-        final E obj1 = (E) new Integer(1);
-        final E obj2 = (E) new Integer(2);
+        final E obj1 = (E) Integer.valueOf(1);
+        final E obj2 = (E) Integer.valueOf(2);
         lset.add(obj1);
         lset.add(obj2);
 
@@ -590,8 +590,8 @@ public class SetUniqueListTest<E> extend
         final SetUniqueList<Integer> lset = new SetUniqueList<Integer>(new ArrayList<Integer>(), new HashSet<Integer>());
 
         // Duplicate element
-        final Integer obj1 = new Integer(1);
-        final Integer obj2 = new Integer(2);
+        final Integer obj1 = Integer.valueOf(1);
+        final Integer obj2 = Integer.valueOf(2);
 
         lset.add(obj1);
         lset.add(obj2);

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/TransformedListTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/TransformedListTest.java?rev=1476855&r1=1476854&r2=1476855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/TransformedListTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/TransformedListTest.java Sun Apr 28 23:15:54 2013
@@ -72,44 +72,44 @@ public class TransformedListTest<E> exte
         for (int i = 0; i < els.length; i++) {
             list.add(els[i]);
             assertEquals(i + 1, list.size());
-            assertEquals(true, list.contains(new Integer((String) els[i])));
+            assertEquals(true, list.contains(Integer.valueOf((String) els[i])));
             assertEquals(false, list.contains(els[i]));
         }
 
         assertEquals(false, list.remove(els[0]));
-        assertEquals(true, list.remove(new Integer((String) els[0])));
+        assertEquals(true, list.remove(Integer.valueOf((String) els[0])));
 
         list.clear();
         for (int i = 0; i < els.length; i++) {
             list.add(0, els[i]);
             assertEquals(i + 1, list.size());
-            assertEquals(new Integer((String) els[i]), list.get(0));
+            assertEquals(Integer.valueOf((String) els[i]), list.get(0));
         }
 
         list.set(0, (E) "22");
-        assertEquals(new Integer(22), list.get(0));
+        assertEquals(Integer.valueOf(22), list.get(0));
 
         final ListIterator<E> it = list.listIterator();
         it.next();
         it.set((E) "33");
-        assertEquals(new Integer(33), list.get(0));
+        assertEquals(Integer.valueOf(33), list.get(0));
         it.add((E) "44");
-        assertEquals(new Integer(44), list.get(1));
+        assertEquals(Integer.valueOf(44), list.get(1));
 
         final List<E> adds = new ArrayList<E>();
         adds.add((E) "1");
         adds.add((E) "2");
         list.clear();
         list.addAll(adds);
-        assertEquals(new Integer(1), list.get(0));
-        assertEquals(new Integer(2), list.get(1));
+        assertEquals(Integer.valueOf(1), list.get(0));
+        assertEquals(Integer.valueOf(2), list.get(1));
 
         adds.clear();
         adds.add((E) "3");
         list.addAll(1, adds);
-        assertEquals(new Integer(1), list.get(0));
-        assertEquals(new Integer(3), list.get(1));
-        assertEquals(new Integer(2), list.get(2));
+        assertEquals(Integer.valueOf(1), list.get(0));
+        assertEquals(Integer.valueOf(3), list.get(1));
+        assertEquals(Integer.valueOf(2), list.get(2));
     }
 
     public void testTransformedList_decorateTransform() {
@@ -121,12 +121,12 @@ public class TransformedListTest<E> exte
         final List<?> list = TransformedList.transformedList(originalList, TransformedCollectionTest.STRING_TO_INTEGER_TRANSFORMER);
         assertEquals(els.length, list.size());
         for (final Object el : els) {
-            assertEquals(true, list.contains(new Integer((String) el)));
+            assertEquals(true, list.contains(Integer.valueOf((String) el)));
             assertEquals(false, list.contains(el));
         }
         
         assertEquals(false, list.remove(els[0]));
-        assertEquals(true, list.remove(new Integer((String) els[0])));
+        assertEquals(true, list.remove(Integer.valueOf((String) els[0])));
     }
 
     @Override



Mime
View raw message