[
https://issues.apache.org/struts/browse/WW-3107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wes Wannemacher updated WW-3107:
--------------------------------
Fix Version/s: 2.1.7
This would appear to be an easy fix, I am going to try to reproduce and see if
a simple null-check will fix it. If it takes more than that, I'm going to bump
this to 2.1.8.
> NPE whlie use ServletActionRedirectResult as Result type
> --------------------------------------------------------
>
> Key: WW-3107
> URL: https://issues.apache.org/struts/browse/WW-3107
> Project: Struts 2
> Issue Type: Bug
> Affects Versions: 2.1.7
> Reporter: Andrey Vasenin
> Fix For: 2.1.7
>
>
> This bug was appeared after WW-3046
> Example
> public ServletActionRedirectResult generate()
> throws Exception
> {
> ServletActionRedirectResult redirect = new
> ServletActionRedirectResult("/namespace", "someaction", "method");
> redirect.addParameter("param", "value");
> return redirect;
> }
> After execute this method we have caught NPE in codeplace:
> -----ServletActionRedirectResult.class
> (169 line)
> ResultConfig resultConfig =
> invocation.getProxy().getConfig().getResults().get(invocation.getResultCode());
> Map resultConfigParams = resultConfig.getParams();
> -----ServletActionRedirectResult
> invocation.getResultCode() == null and as result resultConfig == null
> Upd: stacktrace
> java.lang.NullPointerException
> at
> org.apache.struts2.dispatcher.ServletRedirectResult.doExecute(ServletRedirectResult.java:170)
> at
> org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
> at
> org.apache.struts2.dispatcher.ServletActionRedirectResult.execute(ServletActionRedirectResult.java:176)
> at
> com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:361)
> at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265)
> at
> com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163)
> at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
> at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
> at
> com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:251)
> at
> org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
> at
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
> at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
> ------cut------
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.