commons-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=1369292&view=rev
Log:
Add javadoc comment to prevent removal of a generics fix.

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=1369292&r1=1369291&r2=1369292&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 09:06:21 2012
@@ -520,10 +520,11 @@ public class TestCollectionUtils extends
         Collection<List<? extends Number>> col = new ArrayList<List<? extends
Number>>();
         col.add(collectionA);
         col.add(collectionB);
-        Closure<List<? extends Number>> resultClosure = CollectionUtils.<List<?
extends Number>,Closure<List<? extends Number>>>forAllDo(col, testClosure);
+        Closure<List<? extends Number>> resultClosure = CollectionUtils.forAllDo(col,
testClosure);
         assertSame(testClosure, resultClosure);
         assertTrue(collectionA.isEmpty() && collectionB.isEmpty());
-        resultClosure = CollectionUtils.forAllDo(col, null);
+        // fix for various java 1.6 versions: keep the specialization
+        resultClosure = CollectionUtils.<List<? extends Number>,Closure<List<?
extends Number>>>forAllDo(col, null);
         assertNull(resultClosure);
         assertTrue(collectionA.isEmpty() && collectionB.isEmpty());
         resultClosure = CollectionUtils.forAllDo((Collection) null, testClosure);
@@ -542,6 +543,7 @@ 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);
         assertNull(resultClosure);
         assertTrue(collectionA.isEmpty() && collectionB.isEmpty());



Mime
View raw message