This commit is contained in:
Stephane Nicoll 2018-08-10 09:48:57 +02:00
parent 0ca8f1083a
commit 817a8a8302
1 changed files with 2 additions and 4 deletions

View File

@ -187,7 +187,7 @@ public final class LambdaSafe {
if (argument == null) {
return false;
}
Class<? extends Object> argumentType = argument.getClass();
Class<?> argumentType = argument.getClass();
// On Java 8, the message starts with the class name: "java.lang.String cannot
// be cast..."
if (message.startsWith(argumentType.getName())) {
@ -208,9 +208,7 @@ public final class LambdaSafe {
Object module = ReflectionUtils.invokeMethod(CLASS_GET_MODULE,
argumentType);
Object moduleName = ReflectionUtils.invokeMethod(MODULE_GET_NAME, module);
if (message.startsWith(moduleName + "/" + argumentType.getName())) {
return true;
}
return message.startsWith(moduleName + "/" + argumentType.getName());
}
return false;
}