[
http://www.stripesframework.org/jira/browse/STS-696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Frederic Daoud resolved STS-696.
--------------------------------
Resolution: Fixed
Fix Version/s: Release 1.6
Thanks for the clarification Paul.
I've added your test case and the fix in revision 1152.
> 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.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.
-
If you think it was sent incorrectly contact one of the administrators:
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development