commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r753650 - /commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/ExceptionUtils.java
Date Sat, 14 Mar 2009 13:15:08 GMT
Author: sebb
Date: Sat Mar 14 13:15:07 2009
New Revision: 753650

URL: http://svn.apache.org/viewvc?rev=753650&view=rev
Log:
Cast null for calling getMethods() [Eclipse]

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

Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/ExceptionUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/ExceptionUtils.java?rev=753650&r1=753649&r2=753650&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/ExceptionUtils.java
(original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/ExceptionUtils.java
Sat Mar 14 13:15:07 2009
@@ -87,7 +87,7 @@
     static {
         Method causeMethod;
         try {
-            causeMethod = Throwable.class.getMethod("getCause", null);
+            causeMethod = Throwable.class.getMethod("getCause", (Class[]) null);
         } catch (Exception e) {
             causeMethod = null;
         }
@@ -380,7 +380,7 @@
     private static Throwable getCauseUsingMethodName(Throwable throwable, String methodName)
{
         Method method = null;
         try {
-            method = throwable.getClass().getMethod(methodName, null);
+            method = throwable.getClass().getMethod(methodName, (Class[]) null);
         } catch (NoSuchMethodException ignored) {
             // exception ignored
         } catch (SecurityException ignored) {
@@ -471,7 +471,7 @@
         synchronized(CAUSE_METHOD_NAMES) {
             for (int i = 0, isize = CAUSE_METHOD_NAMES.length; i < isize; i++) {
                 try {
-                    Method method = cls.getMethod(CAUSE_METHOD_NAMES[i], null);
+                    Method method = cls.getMethod(CAUSE_METHOD_NAMES[i], (Class[]) null);
                     if (method != null && Throwable.class.isAssignableFrom(method.getReturnType()))
{
                         return true;
                     }



Mime
View raw message