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 2002/05/17 20:40:48 UTC

DO NOT REPLY [Bug 9208] New: - Bug in RequestUtils - createActionForm() method

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=9208>.
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=9208

Bug in RequestUtils - createActionForm() method

           Summary: Bug in RequestUtils - createActionForm() method
           Product: Struts
           Version: Nightly Build
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Utilities
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: chuckcavaness@attbi.com


In the createActionForm() method of the RequestUils class, I think there might 
be a bug in the part of the code that is checks to see if it can recycle a 
dynamic ActionForm. The line in question is #575. Here's the relavent section:

// Can we recycle the existing form bean instance (if there is one)?
        if (instance != null) {
            if (config.getDynamic()) {
                String className =
                    ((DynaBean) instance).getDynaClass().getName();
                if (className.equals(config.getName())) {
                                             ^
                                             |
============================================= Bug here?

I believe the problem is with the last line above. Shouldn't it be comparing 
the classname against the config.getType() method? Even with a dynamic form, 
the name will be something like "loginForm". I'm not sure how the className 
would ever be equal to the "unqiue" name of the form bean. 

Chuck Cavaness

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>