[COLLECTIONS-414] Fix type inference problems.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1353123 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6db6aa496f
commit
87d923f0d7
|
@ -50,8 +50,7 @@ public class ChainedClosure<E> implements Closure<E>, Serializable {
|
|||
if (closures.length == 0) {
|
||||
return NOPClosure.<E>nopClosure();
|
||||
}
|
||||
closures = FunctorUtils.copy(closures);
|
||||
return new ChainedClosure<E>(closures);
|
||||
return new ChainedClosure<E>(FunctorUtils.copy(closures));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -53,8 +53,7 @@ public class ChainedTransformer<T> implements Transformer<T, T>, Serializable {
|
|||
if (transformers.length == 0) {
|
||||
return NOPTransformer.<T>nopTransformer();
|
||||
}
|
||||
transformers = FunctorUtils.copy(transformers);
|
||||
return new ChainedTransformer<T>(transformers);
|
||||
return new ChainedTransformer<T>(FunctorUtils.copy(transformers));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -58,8 +58,7 @@ public final class NonePredicate<T> implements Predicate<T>, PredicateDecorator<
|
|||
if (predicates.length == 0) {
|
||||
return TruePredicate.<T>truePredicate();
|
||||
}
|
||||
predicates = FunctorUtils.copy(predicates);
|
||||
return new NonePredicate<T>(predicates);
|
||||
return new NonePredicate<T>(FunctorUtils.copy(predicates));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -63,8 +63,7 @@ public final class OnePredicate<T> implements Predicate<T>, PredicateDecorator<T
|
|||
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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -63,9 +63,7 @@ public class SwitchClosure<E> implements Closure<E>, Serializable {
|
|||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -65,9 +65,9 @@ public class SwitchTransformer<I, O> implements Transformer<I, O>, Serializable
|
|||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue