You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/02/17 07:46:13 UTC
DO NOT REPLY [Bug 17116] New: -
DispatchAction Introspection problem
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17116>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17116
DispatchAction Introspection problem
Summary: DispatchAction Introspection problem
Product: Struts
Version: Nightly Build
Platform: All
OS/Version: All
Status: NEW
Severity: Minor
Priority: Other
Component: Standard Actions
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: awkay69@yahoo.com
This one is a bit subtle.
On line 214 of DispatchAction, a missing name parameter is reassigned a value of
"unspecified" in order to force dispatchMethod() to call the predefined
unspecified() method, which can be overridden to provide different handling of a
missing method name. Unfortunately, by relying on dispatchMethod(), you are also
relying on Class.getMethod(), which only returns public methods. This causes the
wrong error message to pop up on the browser.
I see at least four different ways to fix this, and they are all really easy, I
just don't know which one you guys prefer:
1) Make unspecified() public
2) Change line 214 to directly call unspecified() (my preference)
3) Drop line 213-215 altogether, and dispatchMethod will get a null name and
directly call unspecified().
4) Change getMethod() to getDeclaredMethod() so the protected modifier no longer
matters.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org