diff --git a/src/main/java/org/apache/commons/collections4/IterableUtils.java b/src/main/java/org/apache/commons/collections4/IterableUtils.java index 448de58f99..54ba8e6d06 100644 --- a/src/main/java/org/apache/commons/collections4/IterableUtils.java +++ b/src/main/java/org/apache/commons/collections4/IterableUtils.java @@ -678,7 +678,7 @@ public static > List partition(final Iterable> List partition(final Iterable partitions = new ArrayList<>(numberOfPartitions); for (int i = 0; i < numberOfPartitions; ++i) { - partitions.add(partitionFactory.create()); + partitions.add(partitionFactory.get()); } // for each element in inputCollection: diff --git a/src/main/java/org/apache/commons/collections4/functors/CloneTransformer.java b/src/main/java/org/apache/commons/collections4/functors/CloneTransformer.java index 50c0b0465f..ca1d3f28df 100644 --- a/src/main/java/org/apache/commons/collections4/functors/CloneTransformer.java +++ b/src/main/java/org/apache/commons/collections4/functors/CloneTransformer.java @@ -66,7 +66,7 @@ public T transform(final T input) { if (input == null) { return null; } - return PrototypeFactory.prototypeFactory(input).create(); + return PrototypeFactory.prototypeFactory(input).get(); } } diff --git a/src/main/java/org/apache/commons/collections4/functors/FactoryTransformer.java b/src/main/java/org/apache/commons/collections4/functors/FactoryTransformer.java index 4f7605646e..107bc96e1f 100644 --- a/src/main/java/org/apache/commons/collections4/functors/FactoryTransformer.java +++ b/src/main/java/org/apache/commons/collections4/functors/FactoryTransformer.java @@ -77,7 +77,7 @@ public Factory getFactory() { */ @Override public O transform(final I input) { - return iFactory.create(); + return iFactory.get(); } } diff --git a/src/main/java/org/apache/commons/collections4/list/LazyList.java b/src/main/java/org/apache/commons/collections4/list/LazyList.java index f020b59ba0..3add8c96f3 100644 --- a/src/main/java/org/apache/commons/collections4/list/LazyList.java +++ b/src/main/java/org/apache/commons/collections4/list/LazyList.java @@ -131,7 +131,7 @@ protected LazyList(final List list, final Transformer t private E element(final int index) { if (factory != null) { - return factory.create(); + return factory.get(); } if (transformer != null) { return transformer.transform(index);