InputTagSupport.isItemSelected() throws NPE if a Formatter returns null
-----------------------------------------------------------------------
Key: STS-713
URL: http://www.stripesframework.org/jira/browse/STS-713
Project: Stripes
Issue Type: Bug
Components: Tag Library
Affects Versions: Release 1.5.1
Reporter: Niels Godfredsen
Priority: Minor
I encountered the follow exception when using a <stripes:option /> tag in a JSP:
java.lang.NullPointerException
net.sourceforge.stripes.tag.InputTagSupport.isItemSelected(InputTagSupport.java:218)
net.sourceforge.stripes.tag.InputSelectTag.isOptionSelected(InputSelectTag.java:107)
net.sourceforge.stripes.tag.InputOptionTag.doEndInputTag(InputOptionTag.java:125)
net.sourceforge.stripes.tag.InputTagSupport.doEndTag(InputTagSupport.java:442)
After some investigation it appeared that the NPE was triggered by the custom
formatter for an object returning null (in this case because the object's id
field was empty). Updating the formatter to return empty string instead of
null avoided the NPE, but it would be preferable for the tag to handle this
case gracefully.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development