[ http://mc4j.org/jira/browse/STS-378?page=all ]
Ben Gunter updated STS-378:
---------------------------
Attachment: TestAction.java
This is a simple test case to demonstrate the problem. Whether this actually
triggers the problem depends on the JVM's String.hashCode() implementation,
which determines the order of iteration over the keys in the HashMap of handler
names to Methods. This example works on Sun JDK 1.6.0_01. If it doesn't work on
a particular JVM, then swapping the handler names should make it work.
> incorrect event handler invoked with ForwardResolution(Class<? extends
> ActionBean>, String)
> -------------------------------------------------------------------------------------------
>
> Key: STS-378
> URL: http://mc4j.org/jira/browse/STS-378
> Project: Stripes
> Issue Type: Bug
> Components: ActionBean Dispatching
> Affects Versions: Release 1.4.3
> Reporter: Ben Gunter
> Assigned To: Ben Gunter
> Fix For: Release 1.5
>
> Attachments: TestAction.java
>
>
> When a request is received with an explicit event name, like so
> /my/action?foo=
> and that request is forwarded to another (or the same) ActionBean that has an
> event with the same name but a different event is intended to fire, like so
> return new ForwardResolution(getClass(), "bar")
> the original event often will fire on the forwarded request instead of the
> intended event because the original event name is still present as a request
> parameter. This leads to stack overflow or other such problems.
> The event that fires on the forwarded request is determined by the order in
> which the event handler methods are stored in the event handler cache in
> AnnotatedClassActionResolver. The first one whose name is found as a request
> parameter is determined to be the intended event.
> One possible solution to this problem is for ForwardResolution(Class<?
> extends ActionBean>, String) to add the event name as both a request
> parameter and as a request attribute.
> AnnotatedClassActionResolver.getEventName() would check for event as a
> request attribute first and then examine the request parameters after that.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://mc4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development