[ 
http://www.stripesframework.org/jira/browse/STS-696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ben Gunter closed STS-696.
--------------------------


> StripesRuntimeException thrown in AnnotatedClassActionResolver when 
> overriding handler but returning a subclass of the original method
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: STS-696
>                 URL: http://www.stripesframework.org/jira/browse/STS-696
>             Project: Stripes
>          Issue Type: Bug
>          Components: ActionBean Dispatching
>    Affects Versions: Release 1.5, Release 1.5.1
>         Environment: Java 1.5.0_19
>            Reporter: Paul White
>            Assignee: Frederic Daoud
>             Fix For: Release 1.5.2, Release 1.6
>
>         Attachments: AnnotatedClassActionResolverTest.java
>
>
> A net.sourceforge.stripes.exception.StripesRuntimeException is thrown in 
> error at:
> net.sourceforge.stripes.controller.AnnotatedClassActionResolver.processMethods(AnnotatedClassActionResolver.java:226)
> The exception message is "The ActionBean class <classname? declares multiple 
> event handlers for event '<eventname>'"
> This occurs when processing methods for an actionBean that overrides a super 
> class handler with a method returning a subclass of the original method (eg 
> RedirectResolution overriding Resolution). The reason for the error is that 
> AnnotatedClassActionResolver.processMethods is not expecting 
> class.getDeclaredMethods() to include bridge methods. I will attach a test 
> case that displays the problem.
> Workaround is to refactor subclasses to return Resolution rather than 
> ForwardResolution, RedirectResolution etc but it's valid in Java to override 
> methods this way so it should be supported ideally.
> The solution is to change AnnotatedClassActionResolver.java, line 220 as 
> follows:
> if ( Modifier.isPublic(method.getModifiers()) && !method.isBridge() ) {

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to