You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2012/03/13 10:38:06 UTC
svn commit: r1300030 -
/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/IteratorUtils.java
Author: sebb
Date: Tue Mar 13 09:38:06 2012
New Revision: 1300030
URL: http://svn.apache.org/viewvc?rev=1300030&view=rev
Log:
Findbugs: don't catch Exception; more efficient to use valueOf()
Modified:
commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/IteratorUtils.java
Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/IteratorUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/IteratorUtils.java?rev=1300030&r1=1300029&r2=1300030&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/IteratorUtils.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/IteratorUtils.java Tue Mar 13 09:38:06 2012
@@ -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);