Polish
This commit is contained in:
parent
0ca8f1083a
commit
817a8a8302
|
|
@ -187,7 +187,7 @@ public final class LambdaSafe {
|
||||||
if (argument == null) {
|
if (argument == null) {
|
||||||
return false;
|
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
|
// On Java 8, the message starts with the class name: "java.lang.String cannot
|
||||||
// be cast..."
|
// be cast..."
|
||||||
if (message.startsWith(argumentType.getName())) {
|
if (message.startsWith(argumentType.getName())) {
|
||||||
|
|
@ -208,9 +208,7 @@ public final class LambdaSafe {
|
||||||
Object module = ReflectionUtils.invokeMethod(CLASS_GET_MODULE,
|
Object module = ReflectionUtils.invokeMethod(CLASS_GET_MODULE,
|
||||||
argumentType);
|
argumentType);
|
||||||
Object moduleName = ReflectionUtils.invokeMethod(MODULE_GET_NAME, module);
|
Object moduleName = ReflectionUtils.invokeMethod(MODULE_GET_NAME, module);
|
||||||
if (message.startsWith(moduleName + "/" + argumentType.getName())) {
|
return message.startsWith(moduleName + "/" + argumentType.getName());
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue