diff --git a/spring-webflow/src/main/java/org/springframework/webflow/expression/el/ImplicitFlowVariableELResolver.java b/spring-webflow/src/main/java/org/springframework/webflow/expression/el/ImplicitFlowVariableELResolver.java index d6a08cb8..5437cf0e 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/expression/el/ImplicitFlowVariableELResolver.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/expression/el/ImplicitFlowVariableELResolver.java @@ -27,6 +27,9 @@ public class ImplicitFlowVariableELResolver extends ELResolver { return null; } RequestContext requestContext = RequestContextHolder.getRequestContext(); + if (requestContext == null) { + return null; + } if (ImplicitVariables.matches(property)) { context.setPropertyResolved(true); return ImplicitVariables.value(context, requestContext, property).getClass(); @@ -40,6 +43,9 @@ public class ImplicitFlowVariableELResolver extends ELResolver { return null; } RequestContext requestContext = RequestContextHolder.getRequestContext(); + if (requestContext == null) { + return null; + } if (ImplicitVariables.matches(property)) { context.setPropertyResolved(true); return ImplicitVariables.value(context, requestContext, property);