[seam-issues] [JBoss JIRA] Commented: (JBSEAM-4827) FacesMessages may trigger NPE in JSF code
Marek Novotny (JIRA)
jira-events at lists.jboss.org
Mon Jul 18 02:00:23 EDT 2011
[ https://issues.jboss.org/browse/JBSEAM-4827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614693#comment-12614693 ]
Marek Novotny commented on JBSEAM-4827:
---------------------------------------
Hmm, just thinking why is there possible to produce NULL, this shouldn't be passed away if there is no message in StatusMessage. Have you got a simple test case for that?
Thanks for reporting.
> FacesMessages may trigger NPE in JSF code
> -----------------------------------------
>
> Key: JBSEAM-4827
> URL: https://issues.jboss.org/browse/JBSEAM-4827
> Project: Seam 2
> Issue Type: Bug
> Components: JSF Integration
> Affects Versions: 2.2.2.Final
> Reporter: Stephan Bublava
>
> FacesMessages.beforeRenderResponse() passes the return value of FacesMessages.toFacesMessage() to FacesContext.addMessage() without any checks.
> The problem is that toFacesMessage() may return null and FacesContext.addMessage() does not allow that. (See http://download.oracle.com/docs/cd/E17802_01/j2ee/javaee/javaserverfaces/2.0/docs/api/javax/faces/context/FacesContext.html#addMessage(java.lang.String,%20javax.faces.application.FacesMessage)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list