You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2013/04/29 01:33:58 UTC
svn commit: r1476860 - in
/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4:
CollectionUtilsTest.java PredicateUtilsTest.java
map/ReferenceIdentityMapTest.java
Author: sebb
Date: Sun Apr 28 23:33:58 2013
New Revision: 1476860
URL: http://svn.apache.org/r1476860
Log:
Oops - fix up 3 instances where distint Integer instances are required
Modified:
commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/CollectionUtilsTest.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/map/ReferenceIdentityMapTest.java
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=1476860&r1=1476859&r2=1476860&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:33:58 2013
@@ -1343,8 +1343,8 @@ public class CollectionUtilsTest extends
@Test
public void intersectionUsesMethodEquals() {
// Let elta and eltb be objects...
- final Integer elta = Integer.valueOf(17);
- final Integer eltb = Integer.valueOf(17);
+ final Integer elta = new Integer(17); // Cannot use valueOf here
+ final Integer eltb = new Integer(17);
// ...which are equal...
assertEquals(elta, eltb);
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=1476860&r1=1476859&r2=1476860&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:33:58 2013
@@ -104,7 +104,7 @@ public class PredicateUtilsTest extends
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(false, PredicateUtils.identityPredicate(new Integer(6)).evaluate(cInteger)); // Cannot use valueOf here
assertEquals(true, PredicateUtils.identityPredicate(cInteger).evaluate(cInteger));
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/ReferenceIdentityMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/ReferenceIdentityMapTest.java?rev=1476860&r1=1476859&r2=1476860&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/ReferenceIdentityMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/ReferenceIdentityMapTest.java Sun Apr 28 23:33:58 2013
@@ -34,10 +34,10 @@ import org.apache.commons.collections4.m
*/
public class ReferenceIdentityMapTest<K, V> extends AbstractIterableMapTest<K, V> {
- private static final Integer I1A = Integer.valueOf(1);
- private static final Integer I1B = Integer.valueOf(1);
- private static final Integer I2A = Integer.valueOf(2);
- private static final Integer I2B = Integer.valueOf(2);
+ private static final Integer I1A = new Integer(1); // Cannot use valueOf here
+ private static final Integer I1B = new Integer(1);
+ private static final Integer I2A = new Integer(2);
+ private static final Integer I2B = new Integer(2);
public ReferenceIdentityMapTest(final String testName) {
super(testName);