Krzysztof Borgul created SEAMSECURITY-149:
---------------------------------------------
Summary: IdentityImpl.runAs causes NullPointerException
Key: SEAMSECURITY-149
URL:
https://issues.jboss.org/browse/SEAMSECURITY-149
Project: Seam Security
Issue Type: Bug
Affects Versions: 3.0.0.Final
Reporter: Krzysztof Borgul
Priority: Critical
When you invoke runAs method and systemOp field is null (it's default situation) it
will create new ThreadLocal object with initial value equals null. Next value of thread
local will be got and autounboxed it into boolean type. This causes NPE because it cast
null value into boolean type.
You can fix it replacing:
{code}
boolean savedSystemOp = systemOp.get();
{code}
by
{code}
boolean savedSystemOp = systemOp.get();
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira