Fix compilation error.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1648873 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
90f4139bf7
commit
67c51ed7ef
|
@ -1024,10 +1024,10 @@ public class CollectionUtils {
|
||||||
final Predicate<? super O> predicate) {
|
final Predicate<? super O> predicate) {
|
||||||
|
|
||||||
@SuppressWarnings("unchecked") // safe
|
@SuppressWarnings("unchecked") // safe
|
||||||
final Class<R> outputClass = (Class<R>) ArrayList.class;
|
final Factory<R> factory = (Factory<R>) FactoryUtils.instantiateFactory(ArrayList.class);
|
||||||
@SuppressWarnings("unchecked") // safe
|
@SuppressWarnings("unchecked") // safe
|
||||||
final Predicate<? super O>[] predicates = new Predicate[] { predicate };
|
final Predicate<? super O>[] 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<? super O>... predicates) {
|
final Predicate<? super O>... predicates) {
|
||||||
|
|
||||||
@SuppressWarnings("unchecked") // safe
|
@SuppressWarnings("unchecked") // safe
|
||||||
final Class<R> outputClass = (Class<R>) ArrayList.class;
|
final Factory<R> factory = (Factory<R>) FactoryUtils.instantiateFactory(ArrayList.class);
|
||||||
return partition(inputCollection, FactoryUtils.instantiateFactory(outputClass), predicates);
|
return partition(inputCollection, factory, predicates);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue