From 67c51ed7ef1d7acc4010e45eaf8088bd91cb702d Mon Sep 17 00:00:00 2001 From: Thomas Neidhart Date: Thu, 1 Jan 2015 16:29:59 +0000 Subject: [PATCH] Fix compilation error. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1648873 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/commons/collections4/CollectionUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/apache/commons/collections4/CollectionUtils.java b/src/main/java/org/apache/commons/collections4/CollectionUtils.java index 86776d4d5..14c7a27c8 100644 --- a/src/main/java/org/apache/commons/collections4/CollectionUtils.java +++ b/src/main/java/org/apache/commons/collections4/CollectionUtils.java @@ -1024,10 +1024,10 @@ public class CollectionUtils { final Predicate predicate) { @SuppressWarnings("unchecked") // safe - final Class outputClass = (Class) ArrayList.class; + final Factory factory = (Factory) FactoryUtils.instantiateFactory(ArrayList.class); @SuppressWarnings("unchecked") // safe final Predicate[] predicates = new Predicate[] { predicate }; - return partition(inputCollection, FactoryUtils.instantiateFactory(outputClass), predicates); + return partition(inputCollection, factory, predicates); } /** @@ -1108,8 +1108,8 @@ public class CollectionUtils { final Predicate... predicates) { @SuppressWarnings("unchecked") // safe - final Class outputClass = (Class) ArrayList.class; - return partition(inputCollection, FactoryUtils.instantiateFactory(outputClass), predicates); + final Factory factory = (Factory) FactoryUtils.instantiateFactory(ArrayList.class); + return partition(inputCollection, factory, predicates); } /**