Repository: tomee
Updated Branches:
  refs/heads/develop 9670c840f -> 8d70b031d


avoid NPE


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/19f7b116
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/19f7b116
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/19f7b116

Branch: refs/heads/develop
Commit: 19f7b1164a3bbed9acdebe168035076d7ec2f948
Parents: 9670c84
Author: Romain Manni-Bucau <[email protected]>
Authored: Wed Dec 3 16:02:33 2014 +0100
Committer: Romain Manni-Bucau <[email protected]>
Committed: Wed Dec 3 16:02:33 2014 +0100

----------------------------------------------------------------------
 .../apache/openejb/core/security/AbstractSecurityService.java    | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/19f7b116/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java
----------------------------------------------------------------------
diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java
index 2969a92..cd001ed 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java
@@ -243,6 +243,10 @@ public abstract class AbstractSecurityService implements 
SecurityService<UUID>,
         }
 
         final ThreadContext threadContext = ThreadContext.getThreadContext();
+        if (threadContext == null) {
+            return false;
+        }
+
         final SecurityContext securityContext = 
threadContext.get(SecurityContext.class);
 
         if ("**".equals(role)) {

Reply via email to