commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1353123 - in /commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors: ChainedClosure.java ChainedTransformer.java NonePredicate.java OnePredicate.java SwitchClosure.java SwitchTransformer.java
Date Sat, 23 Jun 2012 12:46:07 GMT
Author: tn
Date: Sat Jun 23 12:46:05 2012
New Revision: 1353123

URL: http://svn.apache.org/viewvc?rev=1353123&view=rev
Log:
[COLLECTIONS-414] Fix type inference problems.

Modified:
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/ChainedClosure.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/ChainedTransformer.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/NonePredicate.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/OnePredicate.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/SwitchClosure.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/SwitchTransformer.java

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/ChainedClosure.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/ChainedClosure.java?rev=1353123&r1=1353122&r2=1353123&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/ChainedClosure.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/ChainedClosure.java
Sat Jun 23 12:46:05 2012
@@ -50,8 +50,7 @@ public class ChainedClosure<E> implement
         if (closures.length == 0) {
             return NOPClosure.<E>nopClosure();
         }
-        closures = FunctorUtils.copy(closures);
-        return new ChainedClosure<E>(closures);
+        return new ChainedClosure<E>(FunctorUtils.copy(closures));
     }
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/ChainedTransformer.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/ChainedTransformer.java?rev=1353123&r1=1353122&r2=1353123&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/ChainedTransformer.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/ChainedTransformer.java
Sat Jun 23 12:46:05 2012
@@ -53,8 +53,7 @@ public class ChainedTransformer<T> imple
         if (transformers.length == 0) {
             return NOPTransformer.<T>nopTransformer();
         }
-        transformers = FunctorUtils.copy(transformers);
-        return new ChainedTransformer<T>(transformers);
+        return new ChainedTransformer<T>(FunctorUtils.copy(transformers));
     }
     
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/NonePredicate.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/NonePredicate.java?rev=1353123&r1=1353122&r2=1353123&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/NonePredicate.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/NonePredicate.java
Sat Jun 23 12:46:05 2012
@@ -58,8 +58,7 @@ public final class NonePredicate<T> impl
         if (predicates.length == 0) {
             return TruePredicate.<T>truePredicate();
         }
-        predicates = FunctorUtils.copy(predicates);
-        return new NonePredicate<T>(predicates);
+        return new NonePredicate<T>(FunctorUtils.copy(predicates));
     }
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/OnePredicate.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/OnePredicate.java?rev=1353123&r1=1353122&r2=1353123&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/OnePredicate.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/OnePredicate.java
Sat Jun 23 12:46:05 2012
@@ -63,8 +63,7 @@ public final class OnePredicate<T> imple
         if (predicates.length == 1) {
             return (Predicate<T>) predicates[0];
         }
-        predicates = FunctorUtils.copy(predicates);
-        return new OnePredicate<T>(predicates);
+        return new OnePredicate<T>(FunctorUtils.copy(predicates));
     }
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/SwitchClosure.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/SwitchClosure.java?rev=1353123&r1=1353122&r2=1353123&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/SwitchClosure.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/SwitchClosure.java
Sat Jun 23 12:46:05 2012
@@ -63,9 +63,7 @@ public class SwitchClosure<E> implements
         if (predicates.length == 0) {
             return (Closure<E>) (defaultClosure == null ? NOPClosure.<E>nopClosure():
defaultClosure);
         }
-        predicates = FunctorUtils.copy(predicates);
-        closures = FunctorUtils.copy(closures);
-        return new SwitchClosure<E>(predicates, closures, defaultClosure);
+        return new SwitchClosure<E>(FunctorUtils.copy(predicates), FunctorUtils.copy(closures),
defaultClosure);
     }
 
     /**

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/SwitchTransformer.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/SwitchTransformer.java?rev=1353123&r1=1353122&r2=1353123&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/SwitchTransformer.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/functors/SwitchTransformer.java
Sat Jun 23 12:46:05 2012
@@ -65,9 +65,9 @@ public class SwitchTransformer<I, O> imp
         if (predicates.length == 0) {
             return (Transformer<I, O>) (defaultTransformer == null ? ConstantTransformer.<I,
O>nullTransformer() : defaultTransformer);
         }
-        predicates = FunctorUtils.copy(predicates);
-        transformers = FunctorUtils.copy(transformers);
-        return new SwitchTransformer<I, O>(predicates, transformers, defaultTransformer);
+        return new SwitchTransformer<I, O>(FunctorUtils.copy(predicates),
+                                           FunctorUtils.copy(transformers),
+                                           defaultTransformer);
     }
 
     /**



Mime
View raw message