commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1369355 - /commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/TestCollectionUtils.java
Date Sat, 04 Aug 2012 16:08:02 GMT
Author: tn
Date: Sat Aug  4 16:08:02 2012
New Revision: 1369355

URL: http://svn.apache.org/viewvc?rev=1369355&view=rev
Log:
Type erasure fix changed to a cast.

Modified:
    commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/TestCollectionUtils.java

Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/TestCollectionUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/TestCollectionUtils.java?rev=1369355&r1=1369354&r2=1369355&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/TestCollectionUtils.java
(original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/TestCollectionUtils.java
Sat Aug  4 16:08:02 2012
@@ -523,8 +523,8 @@ public class TestCollectionUtils extends
         Closure<List<? extends Number>> resultClosure = CollectionUtils.forAllDo(col,
testClosure);
         assertSame(testClosure, resultClosure);
         assertTrue(collectionA.isEmpty() && collectionB.isEmpty());
-        // fix for various java 1.6 versions: keep the specialization
-        resultClosure = CollectionUtils.<List<? extends Number>,Closure<List<?
extends Number>>>forAllDo(col, null);
+        // fix for various java 1.6 versions: keep the cast
+        resultClosure = CollectionUtils.forAllDo(col, (Closure<List<? extends Number>>)
null);
         assertNull(resultClosure);
         assertTrue(collectionA.isEmpty() && collectionB.isEmpty());
         resultClosure = CollectionUtils.forAllDo((Collection) null, testClosure);
@@ -543,8 +543,8 @@ public class TestCollectionUtils extends
         Closure<List<? extends Number>> resultClosure = CollectionUtils.forAllDo(col.iterator(),
testClosure);
         assertSame(testClosure, resultClosure);
         assertTrue(collectionA.isEmpty() && collectionB.isEmpty());
-        // fix for various java 1.6 versions: keep the specialization
-        resultClosure = CollectionUtils.<List<? extends Number>,Closure<List<?
extends Number>>>forAllDo(col.iterator(), null);
+        // fix for various java 1.6 versions: keep the cast
+        resultClosure = CollectionUtils.forAllDo(col.iterator(), (Closure<List<? extends
Number>>) null);
         assertNull(resultClosure);
         assertTrue(collectionA.isEmpty() && collectionB.isEmpty());
         resultClosure = CollectionUtils.forAllDo((Iterator) null, testClosure);



Mime
View raw message