[ 
https://issues.apache.org/jira/browse/MYFACES-2663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12858674#action_12858674
 ] 

Jakob Korherr commented on MYFACES-2663:
----------------------------------------

Just as a note: The committed solution only works for h:button and h:link. 
Other places where f:param is used still have to be changed.

> NPE in UIParameter when value resolves to null
> ----------------------------------------------
>
>                 Key: MYFACES-2663
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2663
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.1-SNAPSHOT
>            Reporter: Jan-Kees van Andel
>            Assignee: Jakob Korherr
>         Attachments: MYFACES-2663-tests.patch
>
>
> When I have a null value in an <f:param 
> value="#{expr.that.evaluates.to.null}" /> tag, I get the following NPE when 
> rendering:
> java.lang.NullPointerException
>       at 
> org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.getOutcomeTargetLinkHref(HtmlRendererUtils.java:1883)
>       at 
> org.apache.myfaces.shared_impl.renderkit.html.HtmlLinkRendererBase.renderOutcomeLinkStart(HtmlLinkRendererBase.java:742)
>       at 
> org.apache.myfaces.shared_impl.renderkit.html.HtmlLinkRendererBase.encodeBegin(HtmlLinkRendererBase.java:123)
>       at 
> javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:430)
>       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:605)
>       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:614)
>       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:614)
>       at 
> org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1117)
>       at 
> org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:231)
>       at 
> org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:122)
>       at 
> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:207)
>       at 
> org.apache.myfaces.extensions.scripting.jsf.dynamicdecorators.implemetations.LifefcycleProxy.render(LifefcycleProxy.java:74)
>       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
>       at 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
> I don't know what the spec says or what Mojarra does, but I think we should 
> at least do better than a NPE, for example appending an empty string to the 
> parameter list...
> Any ideas?

-- 
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