You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Wes Wannemacher (JIRA)" <ji...@apache.org> on 2009/06/02 19:55:42 UTC
[jira] Resolved: (WW-3107) NPE whlie use
ServletActionRedirectResult as Result type
[ https://issues.apache.org/struts/browse/WW-3107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wes Wannemacher resolved WW-3107.
---------------------------------
Resolution: Fixed
Assignee: Wes Wannemacher
good catch Andrey, thanks!
> 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
> Assignee: Wes Wannemacher
> 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.