Cast null for calling getMethods() [Eclipse]

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@753650 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2009-03-14 13:15:07 +00:00
parent 43db58d70f
commit 63f03f356c
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}