diff --git a/src/java/org/apache/commons/lang/exception/ExceptionUtils.java b/src/java/org/apache/commons/lang/exception/ExceptionUtils.java index 207cbff22..cb9deda01 100644 --- a/src/java/org/apache/commons/lang/exception/ExceptionUtils.java +++ b/src/java/org/apache/commons/lang/exception/ExceptionUtils.java @@ -87,7 +87,7 @@ public class ExceptionUtils { 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 getCauseUsingWellKnownTypes(Throwable throwable) { 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 @@ public static boolean isNestedThrowable(Throwable throwable) { 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; }