struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Wolfgang Stone (JIRA)" <>
Subject [jira] [Created] (WW-4025) NullPointerException in OgnlTextParser.evaluate().
Date Tue, 26 Mar 2013 02:15:15 GMT
Christian Wolfgang Stone created WW-4025:

             Summary: NullPointerException in OgnlTextParser.evaluate().
                 Key: WW-4025
             Project: Struts 2
          Issue Type: Bug
          Components: Core Interceptors
    Affects Versions: 2.3.14
            Reporter: Christian Wolfgang Stone

In the latest code, lukaszlenart refactored some code.  Using a recent build, I get the following
error (relevant code follows).

	at com.opensymphony.xwork2.util.TextParseUtil$1.evaluate(
	at com.opensymphony.xwork2.util.OgnlTextParser.evaluate(
	at com.opensymphony.xwork2.util.TextParseUtil.translateVariables(
	at com.opensymphony.xwork2.util.TextParseUtil.translateVariables(
	at com.opensymphony.xwork2.util.TextParseUtil.translateVariables(
	at org.apache.struts2.dispatcher.StrutsResultSupport.conditionalParse(
	at org.apache.struts2.dispatcher.StrutsResultSupport.execute(
	at org.apache.struts2.dispatcher.ServletRedirectResult.execute(
	at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
	at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(

The relevant source code is:
+        ParsedValueEvaluator ognlEval = new ParsedValueEvaluator() {
+            public Object evaluate(String parsedValue) {
+                Object o = stack.findValue(parsedValue, asType);
+                if (evaluator != null) {
+                    o = evaluator.evaluate(o.toString());
+                return o;
-        }

Appears as if there is an assumption that the stack.findValue() will always return a non-null

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message