Migrate toward java.util.function
- Package-private changes only - Maintains binary and source compatibility
This commit is contained in:
parent
ee307055b7
commit
e42f60b041
|
@ -108,7 +108,7 @@ public class ChainedTransformer<T> implements Transformer<T, T>, Serializable {
|
|||
* @since 3.1
|
||||
*/
|
||||
public Transformer<? super T, ? extends T>[] getTransformers() {
|
||||
return FunctorUtils.<T, T>copy(iTransformers);
|
||||
return FunctorUtils.copy(iTransformers);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -111,17 +111,17 @@ final class FunctorUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* Copy method
|
||||
* Copy method.
|
||||
*
|
||||
* @param transformers the transformers to copy
|
||||
* @return a clone of the transformers
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <I, O> Transformer<I, O>[] copy(final Transformer<? super I, ? extends O>... transformers) {
|
||||
static <T extends Function<?, ?>> T[] copy(final T... transformers) {
|
||||
if (transformers == null) {
|
||||
return null;
|
||||
}
|
||||
return (Transformer<I, O>[]) transformers.clone();
|
||||
return transformers.clone();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -174,7 +174,7 @@ public class SwitchTransformer<I, O> implements Transformer<I, O>, Serializable
|
|||
* @since 3.1
|
||||
*/
|
||||
public Transformer<? super I, ? extends O>[] getTransformers() {
|
||||
return FunctorUtils.<I, O>copy(iTransformers);
|
||||
return FunctorUtils.copy(iTransformers);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue