[jbossseam-issues] [JBoss JIRA] Closed: (JBSEAM-331) NPE in PageContext.getCurrentReadableMap() and PageContext.getCurrentWritableMap(), using others PhaseListeners

Gavin King (JIRA) jira-events at lists.jboss.org
Mon Feb 26 18:28:35 EST 2007


     [ http://jira.jboss.com/jira/browse/JBSEAM-331?page=all ]

Gavin King closed JBSEAM-331.
-----------------------------

    Resolution: Out of Date
      Assignee: Gavin King

> NPE in PageContext.getCurrentReadableMap() and PageContext.getCurrentWritableMap(), using others PhaseListeners
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: JBSEAM-331
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-331
>             Project: JBoss Seam
>          Issue Type: Patch
>          Components: JSF
>         Environment: JBoss 4.0.4-GA, JBoss Seam 1.0.1-GA, Ajax4Jsf  1.0 rc4
>            Reporter: Luiz Augusto Ruiz
>         Assigned To: Gavin King
>
> SeamPhaseListener.afterPhase() invokes Lifecycle.setPhaseId(null) after the phase INVOKE_APPLICATION(5). If exists other PhaseListener that is called after SeamPhaseListener, and use a variable, when the methods PageContext.getCurrent [Readable/Writeble] Map() are called the Null Pointer Exception occurs.
> The patch checks for null PhaseId before use it.
> ----------------------------
>    private Map getCurrentReadableMap()
>    {
> 	  PhaseId phaseId = Lifecycle.getPhaseId();
> 	  if (null == phaseId) {
> 		  return nextPageMap;
> 	  }
>       return phaseId.compareTo(PhaseId.INVOKE_APPLICATION) > 0 ?
>             nextPageMap : previousPageMap;
>    }
>    private Map getCurrentWritableMap()
>    {
> 	  PhaseId phaseId = Lifecycle.getPhaseId();
> 	  if (null == phaseId) {
> 		  return nextPageMap;
> 	  }
>       return phaseId.compareTo(PhaseId.INVOKE_APPLICATION) < 0 ?
>             previousPageMap : nextPageMap;
>    }
> -------------------------------------

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

        



More information about the seam-issues mailing list