[
http://jira.jboss.com/jira/browse/JBSEAM-471?page=comments#action_12346422 ]
Crayton OSteen commented on JBSEAM-471:
---------------------------------------
I ran into this while running multiple scripts in my Unit Tests.
facesContext.getExternalContext() was null. Please change
public Principal getUserPrincipal()
{
FacesContext facesContext = FacesContext.getCurrentInstance();
return facesContext==null ? null :
facesContext.getExternalContext().getUserPrincipal();
}
to
public Principal getUserPrincipal()
{
FacesContext facesContext = FacesContext.getCurrentInstance();
return ((facesContext==null) || (facesContext.getExternalContext()==null)) ? null :
facesContext.getExternalContext().getUserPrincipal();
}
Method getUserPrincipal() in UserPrincipal has NullPointerException
-------------------------------------------------------------------
Key: JBSEAM-471
URL:
http://jira.jboss.com/jira/browse/JBSEAM-471
Project: JBoss Seam
Issue Type: Patch
Components: Core
Affects Versions: 1.1.0.BETA1
Reporter: Crayton OSteen
Assigned To: Gavin King
Priority: Trivial
Fix For: 1.1.0.BETA1
--
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