commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1026188 - /commons/proper/collections/trunk/src/test/org/apache/commons/collections/TestPredicateUtils.java
Date Fri, 22 Oct 2010 01:01:45 GMT
Author: sebb
Date: Fri Oct 22 01:01:45 2010
New Revision: 1026188

URL: http://svn.apache.org/viewvc?rev=1026188&view=rev
Log:
Generics

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

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/TestPredicateUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/TestPredicateUtils.java?rev=1026188&r1=1026187&r2=1026188&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/TestPredicateUtils.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/TestPredicateUtils.java
Fri Oct 22 01:01:45 2010
@@ -213,10 +213,9 @@ public class TestPredicateUtils extends 
         assertTrue(AllPredicate.allPredicate(coll), null);
     }
 
-    @SuppressWarnings("unchecked")
     @Test public void testAllPredicateEx1() {
         try {
-            AllPredicate.allPredicate((Predicate[]) null);
+            AllPredicate.allPredicate((Predicate<Object>[]) null);
         } catch (IllegalArgumentException ex) {
             return;
         }
@@ -302,7 +301,7 @@ public class TestPredicateUtils extends 
                 FalsePredicate.falsePredicate(), FalsePredicate.falsePredicate(), TruePredicate.truePredicate()}).evaluate(null));
         assertEquals(false, PredicateUtils.anyPredicate(new Predicate[] {
                 FalsePredicate.falsePredicate(), FalsePredicate.falsePredicate(), FalsePredicate.falsePredicate()}).evaluate(null));
-        Collection coll = new ArrayList();
+        Collection<Predicate<Object>> coll = new ArrayList<Predicate<Object>>();
         coll.add(TruePredicate.truePredicate());
         coll.add(TruePredicate.truePredicate());
         coll.add(TruePredicate.truePredicate());
@@ -332,10 +331,9 @@ public class TestPredicateUtils extends 
         assertFalse(PredicateUtils.anyPredicate(coll), null);
     }
 
-    @SuppressWarnings("unchecked")
     @Test public void testAnyPredicateEx1() {
         try {
-            PredicateUtils.anyPredicate((Predicate[]) null);
+            PredicateUtils.anyPredicate((Predicate<Object>[]) null);
         } catch (IllegalArgumentException ex) {
             return;
         }
@@ -454,10 +452,9 @@ public class TestPredicateUtils extends 
         assertFalse(PredicateUtils.onePredicate(coll), null);
     }
 
-    @SuppressWarnings("unchecked")
     @Test public void testOnePredicateEx1() {
         try {
-            PredicateUtils.onePredicate((Predicate[]) null);
+            PredicateUtils.onePredicate((Predicate<Object>[]) null);
         } catch (IllegalArgumentException ex) {
             return;
         }
@@ -484,10 +481,9 @@ public class TestPredicateUtils extends 
         fail();
     }
 
-    @SuppressWarnings("unchecked")
     @Test public void testOnePredicateEx4() {
         try {
-            PredicateUtils.onePredicate((Collection) null);
+            PredicateUtils.onePredicate((Collection<Predicate<Object>>) null);
         } catch (IllegalArgumentException ex) {
             return;
         }
@@ -574,10 +570,9 @@ public class TestPredicateUtils extends 
         assertTrue(PredicateUtils.nonePredicate(coll), null);
     }
 
-    @SuppressWarnings("unchecked")
     @Test public void testNonePredicateEx1() {
         try {
-            PredicateUtils.nonePredicate((Predicate[]) null);
+            PredicateUtils.nonePredicate((Predicate<Object>[]) null);
         } catch (IllegalArgumentException ex) {
             return;
         }



Mime
View raw message