diff --git a/src/main/java/org/apache/commons/collections4/functors/FunctorUtils.java b/src/main/java/org/apache/commons/collections4/functors/FunctorUtils.java index 93f4f7b2c..8a9f57700 100644 --- a/src/main/java/org/apache/commons/collections4/functors/FunctorUtils.java +++ b/src/main/java/org/apache/commons/collections4/functors/FunctorUtils.java @@ -22,7 +22,6 @@ import java.util.function.Consumer; import java.util.function.Function; import org.apache.commons.collections4.Predicate; -import org.apache.commons.collections4.Transformer; /** * Internal utilities for functors. @@ -60,8 +59,8 @@ final class FunctorUtils { * @return the coerced transformer. */ @SuppressWarnings("unchecked") - static Transformer coerce(final Transformer transformer) { - return (Transformer) transformer; + static , P extends Function, I, O> R coerce(final P transformer) { + return (R) transformer; } /**