struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4331) ConventionUnknownHandler throws null
Date Tue, 29 Jul 2014 18:32:43 GMT

    [ https://issues.apache.org/jira/browse/WW-4331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14078136#comment-14078136
] 

Hudson commented on WW-4331:
----------------------------

SUCCESS: Integrated in Struts-JDK6-develop #66 (See [https://builds.apache.org/job/Struts-JDK6-develop/66/])
WW-4331 Returns null instead of throwing exception (lukaszlenart: rev ff100ce2d9c939e9cf4867bc46966a7dfecb6770)
* plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
* xwork-core/src/main/java/com/opensymphony/xwork2/UnknownHandler.java


> ConventionUnknownHandler throws null
> ------------------------------------
>
>                 Key: WW-4331
>                 URL: https://issues.apache.org/jira/browse/WW-4331
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Convention
>    Affects Versions: 2.3.15.2
>         Environment: Tomcat 7.0.50
> Java 1.7.0_40
>            Reporter: justin miller
>            Assignee: Lukasz Lenart
>            Priority: Minor
>             Fix For: 2.3.18
>
>
> ConventionUnknownHandler's handleUnknownActionMethod() always throws null which causes
a NullPointerException when using the Rest-Plugin. This method is called due to RestActionMapper
setting the default action method to "index" while the ConventionUnknownHandler creates an
ActionSupport proxy expecting the "execute" method.  Throwing null prevents the HandlerManager
from handing off to the next UnknownHandler in the list, if one exists.  This is related to
issue WW-3368.  Here's the abbreviated stack trace:
> {noformat}
> java.lang.NullPointerException
> 	org.apache.struts2.convention.ConventionUnknownHandler.handleUnknownActionMethod(ConventionUnknownHandler.java:423)
> 	com.opensymphony.xwork2.DefaultUnknownHandlerManager.handleUnknownMethod(DefaultUnknownHandlerManager.java:96)
> 	com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:437)
> 	com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:289)
> 	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:252)
> 	org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:138)
> {noformat}
> Here's the patch:
> 423c423
> <         throw null;
> ---
> >         return null;



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message