myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Kieselhorst (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Commented] (MYFACES-4140) NullPointerException instead of InvalidViewIdException
Date Sat, 09 Sep 2017 08:35:02 GMT

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

Dennis Kieselhorst commented on MYFACES-4140:
---------------------------------------------

Well I'm unsure how to fix it. Simply adding a null check and throw InvalidViewIdException
will probably cause side effects in other cases. The code already contains a comment from
[~lu4242] "Temporally reverted by TCK issues."

> NullPointerException instead of InvalidViewIdException
> ------------------------------------------------------
>
>                 Key: MYFACES-4140
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4140
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.3.0-beta
>            Reporter: Dennis Kieselhorst
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> In case of an invalid viewId an NPE is thrown instead of InvalidViewIdException. This
is reproducible using tobago-example-demo (NavigationTree /content/root-dummy.xhtml).
> {noformat}
> Caused by: java.lang.NullPointerException
>         at org.apache.myfaces.application.ViewHandlerImpl.getViewParameterList(ViewHandlerImpl.java:459)
>         at org.apache.myfaces.application.ViewHandlerImpl.getBookmarkableURL(ViewHandlerImpl.java:141)
>         at javax.faces.application.ViewHandlerWrapper.getBookmarkableURL(ViewHandlerWrapper.java:134)
>         at javax.faces.application.ViewHandlerWrapper.getBookmarkableURL(ViewHandlerWrapper.java:134)
>         at org.apache.myfaces.tobago.internal.util.RenderUtils.generateUrl(RenderUtils.java:229)
>         at org.apache.myfaces.tobago.internal.renderkit.renderer.CommandRendererBase.encodeBegin(CommandRendererBase.java:86)
>         at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:597)
>         at javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:527)
>         at javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:551)
>         at org.apache.myfaces.tobago.internal.renderkit.renderer.TreeRenderer.encodeEnd(TreeRenderer.java:130)
>         at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:675)
>         at javax.faces.component.UIData.encodeEnd(UIData.java:1811)
>         at javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:555)
>         at javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:551)
>         at javax.faces.render.Renderer.encodeChildren(Renderer.java:95)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message