commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1188373 - in /commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/generator/util: TestIntegerRange.java TestLongRange.java
Date Mon, 24 Oct 2011 20:54:57 GMT
Author: sebb
Date: Mon Oct 24 20:54:57 2011
New Revision: 1188373

URL: http://svn.apache.org/viewvc?rev=1188373&view=rev
Log:
Fix generics

Modified:
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/generator/util/TestIntegerRange.java
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/generator/util/TestLongRange.java

Modified: commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/generator/util/TestIntegerRange.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/generator/util/TestIntegerRange.java?rev=1188373&r1=1188372&r2=1188373&view=diff
==============================================================================
--- commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/generator/util/TestIntegerRange.java
(original)
+++ commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/generator/util/TestIntegerRange.java
Mon Oct 24 20:54:57 2011
@@ -30,7 +30,6 @@ import org.junit.Test;
  * @author Jason Horman (jason@jhorman.org)
  * @author Rodney Waldhoff
  */
-@SuppressWarnings("unchecked")
 public class TestIntegerRange extends BaseFunctorTest {
 
     @Override
@@ -45,7 +44,7 @@ public class TestIntegerRange extends Ba
     public void testGenerateListExample() {
         // generates a collection of Integers from 0 (inclusive) to 10 (exclusive)
         {
-            List list = (List)(new IntegerRange(0,10).to(new ArrayList()));
+            List<? super Integer> list = (List<? super Integer>)(new IntegerRange(0,10).to(new
ArrayList<Integer>()));
             for (int i=0;i<10;i++) {
                 assertEquals(new Integer(i),list.get(i));
             }
@@ -53,7 +52,7 @@ public class TestIntegerRange extends Ba
 
         // generates a collection of Integers from 10 (inclusive) to 0 (exclusive)
         {
-            List list = (List)(new IntegerRange(10,0).to(new ArrayList()));
+            List<? super Integer> list = (List<? super Integer>)(new IntegerRange(10,0).to(new
ArrayList<Integer>()));
             for (int i=10;i>0;i--) {
                 assertEquals(new Integer(i),list.get(10-i));
             }

Modified: commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/generator/util/TestLongRange.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/generator/util/TestLongRange.java?rev=1188373&r1=1188372&r2=1188373&view=diff
==============================================================================
--- commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/generator/util/TestLongRange.java
(original)
+++ commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/generator/util/TestLongRange.java
Mon Oct 24 20:54:57 2011
@@ -30,7 +30,6 @@ import org.junit.Test;
  * @author Jason Horman (jason@jhorman.org)
  * @author Rodney Waldhoff
  */
-@SuppressWarnings("unchecked")
 public class TestLongRange extends BaseFunctorTest {
 
     @Override
@@ -45,7 +44,7 @@ public class TestLongRange extends BaseF
     public void testGenerateListExample() {
         // generates a collection of Integers from 0 (inclusive) to 10 (exclusive)
         {
-            List list = (List)(new LongRange(0,10).to(new ArrayList()));
+            List<? super Long> list = (List<? super Long>)(new LongRange(0,10).to(new
ArrayList<Long>()));
             for (int i=0;i<10;i++) {
                 assertEquals(new Long(i),list.get(i));
             }
@@ -53,7 +52,7 @@ public class TestLongRange extends BaseF
 
         // generates a collection of Integers from 10 (inclusive) to 0 (exclusive)
         {
-            List list = (List)(new LongRange(10,0).to(new ArrayList()));
+            List<? super Long> list = (List<? super Long>)(new LongRange(10,0).to(new
ArrayList<Long>()));
             for (int i=10;i>0;i--) {
                 assertEquals(new Long(i),list.get(10-i));
             }



Mime
View raw message