MethodReference accesses cached executor in a thread-safe manner

Issue: SPR-12269
This commit is contained in:
Juergen Hoeller
2014-09-30 14:06:43 +02:00
parent 6009c09f1b
commit 0cc877ad0f

View File

@@ -230,7 +230,7 @@ public class MethodReference extends SpelNodeImpl {
private void updateExitTypeDescriptor() {
CachedMethodExecutor executorToCheck = this.cachedExecutor;
if (executorToCheck.get() instanceof ReflectiveMethodExecutor) {
if (executorToCheck != null && executorToCheck.get() instanceof ReflectiveMethodExecutor) {
Method method = ((ReflectiveMethodExecutor) executorToCheck.get()).getMethod();
this.exitTypeDescriptor = CodeFlow.toDescriptor(method.getReturnType());
}