Potential NullPointerException from HtmlResponseWriterImpl.writeAttribute()
---------------------------------------------------------------------------

         Key: MYFACES-599
         URL: http://issues.apache.org/jira/browse/MYFACES-599
     Project: MyFaces
        Type: Bug
    Versions: 1.1.0    
 Environment: Any
    Reporter: Kris Nuttycombe


org.apache.myfaces.renderkit.html.HtmlResponseWriterImpl.writeAttribute() can 
throw a NullPointerException if the value passed for the attribute value is 
null because of a call to value.toString(). I'm not sure what the correct 
failure-tolerant behavior would be - the method throws NullPointerException 
explicitly with a detail message if the name is null, but the value being null 
is a common enough occurrance that the method should either:

* Render an empty string as the value of the attribute
* Return without rendering the attribute at all and log a warning

I will provide a patch to supply whatever functionality is deemed appropriate, 
if desired.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to