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=12027>. 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=12027 bean;size should throw clear exception if neither "name" or "collection" are set Summary: bean;size should throw clear exception if neither "name" or "collection" are set Product: Struts Version: 1.1 Beta 2 Platform: Other OS/Version: Other Status: NEW Severity: Enhancement Priority: Other Component: Custom Tags AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The "SizeTag.doStartTag()" method should be enhanced to do the following: If both the "collection" and "name" attributes are null, it should throw an exception, indicating a precondition violation. This is much nicer than the NPE you get now. In the present library, it's not likely that someone would run into this. They could specify only a "collection" attribute and somehow specify a null value, perhaps from a function call. However, in my derived "Struts-EL" library, the value of this attribute will be an EL expression. If they specified the wrong variable in the expression (like I did when I first tested my code :) ), then they will get the mysterious NPE, when a more directed exception, indicating that neither "name" or "collection" was set, would have been much more helpful. I have a feeling that there are many places in the tag library where checking of attribute preconditions could be done better, but I haven't fully examined this. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>