Localise @SuppressWarning
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1024086 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e6f8d11ba9
commit
a6e67175e0
|
@ -95,12 +95,12 @@ class FunctorUtils {
|
|||
* @param predicates the predicates to validate
|
||||
* @return predicate array
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <T> Predicate<T>[] validate(Collection<? extends Predicate<T>> predicates) {
|
||||
if (predicates == null) {
|
||||
throw new IllegalArgumentException("The predicate collection must not be null");
|
||||
}
|
||||
// convert to array like this to guarantee iterator() ordering
|
||||
@SuppressWarnings("unchecked") // OK
|
||||
Predicate<T>[] preds = new Predicate[predicates.size()];
|
||||
int i = 0;
|
||||
for (Predicate<T> predicate : predicates) {
|
||||
|
|
Loading…
Reference in New Issue