struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 10881] New: - PATCH: DynaActionForm throws unhelpful NPE on invalid form-property type
Date Tue, 16 Jul 2002 23:03:23 GMT
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=10881>.
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=10881

PATCH: DynaActionForm throws unhelpful NPE on invalid form-property type

           Summary: PATCH: DynaActionForm throws unhelpful NPE on invalid
                    form-property type
           Product: Struts
           Version: Nightly Build
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Standard Actions
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: turner@blackbear.com


Create a form with a form-property which has a type of java.lang.String[10], 
when you use the form in JSP, DynaActionForm.set throws an NPE which is very 
hard to track down.

Patch:
Index: DynaActionForm.java
===================================================================
RCS file: /home/cvspublic/jakarta-
struts/src/share/org/apache/struts/action/Dyna
ActionForm.java,v
retrieving revision 1.2
diff -u -r1.2 DynaActionForm.java
--- DynaActionForm.java 18 Jan 2002 03:46:52 -0000      1.2
+++ DynaActionForm.java 16 Jul 2002 22:56:00 -0000
351a405,406
>      * @exception NullPointerException if the type specified for the
>      *  property is invalid.
358a414,418
>           if (descriptor.getType() == null) {
>               throw new NullPointerException
>                   ("The type for property " + name +
>                    " is invalid.");
>           }

--
To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@jakarta.apache.org>


Mime
View raw message