[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-4035) Calling getPage outside of a JSF request causes NPE

Norman Richards (JIRA) jira-events at lists.jboss.org
Thu Mar 26 19:02:22 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBSEAM-4035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12459315#action_12459315 ] 

Norman Richards commented on JBSEAM-4035:
-----------------------------------------

Specifically, you think the method should be:

private Page getCachedPage(String viewId)
{
      return pagesByViewId.get(viewId);
}


That bug is so old that it's hard to go back and see what the original issue was that they were trying to solve.  I ran through that code with several examples, and I don't see any case that it is performing a useful function.  However, I'm somewhat hesitant to remove the code without being really clear about what the issue was.  



> Calling getPage outside of a JSF request causes NPE
> ---------------------------------------------------
>
>                 Key: JBSEAM-4035
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-4035
>             Project: Seam
>          Issue Type: Bug
>            Reporter: V K
>
> Please see https://jira.jboss.org/jira/browse/JBSEAM-1128 from early 2007. The issue is verified to be fixed with the given code being changed/removed, but 2.0.3.CR1 shows that exact piece of code as in the original bug report. 
> The original reporter stated:
> "However calling getPage() outside of a JSF request throws NPE as Pages.getSuffix() calls
> FacesContext.getCurrentInstance().getExternalContext().getInitParameter(ViewHandler.DEFAULT_SUFFIX_PARAM_NAME);"
> Gavin King then said "Yep, the bug is fixed in current RI versions (from 03), so I removed this code." That code is not removed, however.

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

        



More information about the seam-issues mailing list