From 230ae8f1f5f9249496924888416eced31f74faad Mon Sep 17 00:00:00 2001 From: Thomas Neidhart Date: Sat, 4 Aug 2012 09:06:21 +0000 Subject: [PATCH] Add javadoc comment to prevent removal of a generics fix. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1369292 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/commons/collections/TestCollectionUtils.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/apache/commons/collections/TestCollectionUtils.java b/src/test/java/org/apache/commons/collections/TestCollectionUtils.java index 86df5fb6d..072f00ef9 100644 --- a/src/test/java/org/apache/commons/collections/TestCollectionUtils.java +++ b/src/test/java/org/apache/commons/collections/TestCollectionUtils.java @@ -520,10 +520,11 @@ public class TestCollectionUtils extends MockTestCase { Collection> col = new ArrayList>(); col.add(collectionA); col.add(collectionB); - Closure> resultClosure = CollectionUtils.,Closure>>forAllDo(col, testClosure); + Closure> 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.,Closure>>forAllDo(col, null); assertNull(resultClosure); assertTrue(collectionA.isEmpty() && collectionB.isEmpty()); resultClosure = CollectionUtils.forAllDo((Collection) null, testClosure); @@ -542,6 +543,7 @@ public class TestCollectionUtils extends MockTestCase { Closure> 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.,Closure>>forAllDo(col.iterator(), null); assertNull(resultClosure); assertTrue(collectionA.isEmpty() && collectionB.isEmpty());