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

html:options doEndTag doesn't check for null value return from iterator

           Summary: html:options doEndTag doesn't check for null value
                    return from iterator
           Product: Struts
           Version: 1.0.1 Final
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Custom Tags
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


org.apache.struts.taglib.html.OptionsTag.doEndTag() handles both collections and
iterators.  When handling a collection, it properly checks for null values and
substitutes the empty string for values and labels.  When handling an iterator
however, it immediately calls toString on the return value without checking for
null:

while (valuesIterator.hasNext()) {
    String value = valuesIterator.next().toString();
    String label = value;
    if (labelsIterator.hasNext())
        label = labelsIterator.next().toString();

This bug is also present in the most recent version of the file (1.14).

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to