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:
Sebastian Bazley 2010-10-19 01:40:07 +00:00
parent e6f8d11ba9
commit a6e67175e0
1 changed files with 1 additions and 1 deletions

View File

@ -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) {