[
http://www.stripesframework.org/jira/browse/STS-696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul White updated STS-696:
---------------------------
Attachment: AnnotatedClassActionResolverTest.java
This test case demonstrates the issue. It passes when the above change to
AnnotatedClassActionResolver.java is made.
> 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
> 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
------------------------------------------------------------------------------
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development