Findbugs: don't catch Exception; more efficient to use valueOf()

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1300030 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2012-03-13 09:38:06 +00:00
parent bef3b732bd
commit 829da75d82
1 changed files with 8 additions and 1 deletions

View File

@ -17,6 +17,7 @@
package org.apache.commons.collections;
import java.lang.reflect.Array;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
@ -939,7 +940,13 @@ public class IteratorUtils {
return it;
}
}
} catch (Exception ex) {
} catch (RuntimeException e) {
// ignore
} catch (NoSuchMethodException e) {
// ignore
} catch (IllegalAccessException e) {
// ignore
} catch (InvocationTargetException e) {
// ignore
}
return singletonIterator(obj);