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