[ 
https://issues.apache.org/jira/browse/TOMAHAWK-1050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Grant Smith updated TOMAHAWK-1050:
----------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

Thanks Christian.

> NullPointerException in <s:ifMessage/>
> --------------------------------------
>
>                 Key: TOMAHAWK-1050
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1050
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Message(s)
>    Affects Versions: 1.1.6
>            Reporter: Christian Kaltepoth
>            Assignee: Grant Smith
>             Fix For: 1.1.7-SNAPSHOT
>
>         Attachments: ifmessage-nullpointer.patch
>
>
> Omitting the 'for' attribute using <s:ifMessage/> causes a 
> NullPointerException
> although the attribute is declared as 'not required' in the TLD:
> Caused by: java.lang.NullPointerException
>         at java.util.StringTokenizer.<init>(StringTokenizer.java:182)
>         at java.util.StringTokenizer.<init>(StringTokenizer.java:204)
>         at 
> org.apache.myfaces.custom.ifmessage.IfMessage.encodeChildren(IfMessage.java:75)
>         at 
> org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:414)
>         at 
> org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChildren(RendererUtils.java:400)
>         at 
> org.apache.myfaces.shared_impl.renderkit.html.HtmlGroupRendererBase.encodeEnd(HtmlGroupRendererBase.java:78)
>         at 
> javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
>         at 
> javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:498)
>         at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:366)
>         at 
> org.apache.myfaces.shared_impl.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:57)
>         at 
> org.apache.jsp.test_jsp._jspx_meth_h_panelGroup_0(org.apache.jsp.test_jsp:230)
>         at 
> org.apache.jsp.test_jsp._jspx_meth_h_form_0(org.apache.jsp.test_jsp:157)
>         at 
> org.apache.jsp.test_jsp._jspx_meth_f_view_0(org.apache.jsp.test_jsp:125)
>         at org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:89)
>         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:80)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
>         ... 33 more
> The attached patch solves this problem. The component now considers 
> messages for _all_ components if the "for" attribute is not used.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to