commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r1370919 - /commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/QuicksortExample.java
Date Wed, 08 Aug 2012 19:50:46 GMT
Author: mbenson
Date: Wed Aug  8 19:50:46 2012
New Revision: 1370919

URL: http://svn.apache.org/viewvc?rev=1370919&view=rev
Log:
make sure all generic signatures match; eclipse was seemingly compiling in such a way that
method calls with casting were not routing properly

Modified:
    commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/QuicksortExample.java

Modified: commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/QuicksortExample.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/QuicksortExample.java?rev=1370919&r1=1370918&r2=1370919&view=diff
==============================================================================
--- commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/QuicksortExample.java
(original)
+++ commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/QuicksortExample.java
Wed Aug  8 19:50:46 2012
@@ -411,7 +411,7 @@ public class QuicksortExample {
  */
 
     public abstract class ObjectListFunction implements BinaryFunction<Object, Object,
Object> {
-        public abstract Object evaluate(Object head, List<Object> tail);
+        public abstract Object evaluate(Object head, List<?> tail);
 
         public Object evaluate(Object left, Object right) {
             if (left != null && right instanceof List) {
@@ -462,7 +462,7 @@ public class QuicksortExample {
     @SuppressWarnings("rawtypes")
     private BinaryFunction<Object, Object, Object> lesserTail = new ObjectListFunction()
{
         @Override
-        public Object evaluate(Object head, List<Object> tail) {
+        public Object evaluate(Object head, List<?> tail) {
             return new FilteredGenerator(
                     IteratorToGeneratorAdapter.adapt(tail.iterator()),
                     IsLessThan.instance((Comparable<?>) head)).toCollection();
@@ -477,7 +477,7 @@ public class QuicksortExample {
     @SuppressWarnings("rawtypes")
     private BinaryFunction greaterTail = new ObjectListFunction() {
         @Override
-        public Object evaluate(Object head, List<Object> tail) {
+        public Object evaluate(Object head, List<?> tail) {
             return new FilteredGenerator(
                     IteratorToGeneratorAdapter.adapt(tail.iterator()),
                  IsGreaterThanOrEqual.instance((Comparable<?>) head)).toCollection();



Mime
View raw message