mirror of
https://github.com/apache/commons-collections.git
synced 2025-02-17 23:44:48 +00:00
Type erasure fix changed to a cast.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1369355 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
230ae8f1f5
commit
f70c2a72ee
@ -523,8 +523,8 @@ public class TestCollectionUtils extends MockTestCase {
|
||||
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 MockTestCase {
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user