You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mb...@apache.org on 2011/04/11 16:41:44 UTC

svn commit: r1091091 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java

Author: mbenson
Date: Mon Apr 11 14:41:44 2011
New Revision: 1091091

URL: http://svn.apache.org/viewvc?rev=1091091&view=rev
Log:
remove unnecessary reflection parameter args

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java?rev=1091091&r1=1091090&r2=1091091&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java Mon Apr 11 14:41:44 2011
@@ -193,7 +193,7 @@ public class ExceptionUtils {
     private static Throwable getCauseUsingMethodName(Throwable throwable, String methodName) {
         Method method = null;
         try {
-            method = throwable.getClass().getMethod(methodName, (Class[]) null);
+            method = throwable.getClass().getMethod(methodName);
         } catch (NoSuchMethodException ignored) { // NOPMD
             // exception ignored
         } catch (SecurityException ignored) { // NOPMD
@@ -202,7 +202,7 @@ public class ExceptionUtils {
 
         if (method != null && Throwable.class.isAssignableFrom(method.getReturnType())) {
             try {
-                return (Throwable) method.invoke(throwable, ArrayUtils.EMPTY_OBJECT_ARRAY);
+                return (Throwable) method.invoke(throwable);
             } catch (IllegalAccessException ignored) { // NOPMD
                 // exception ignored
             } catch (IllegalArgumentException ignored) { // NOPMD