You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by gp...@apache.org on 2019/06/26 18:42:57 UTC
[deltaspike] branch master updated: DELTASPIKE-1383 Fix multiple
threads causing NPE in Authorizer
This is an automated email from the ASF dual-hosted git repository.
gpetracek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/deltaspike.git
The following commit(s) were added to refs/heads/master by this push:
new d95495b DELTASPIKE-1383 Fix multiple threads causing NPE in Authorizer
d95495b is described below
commit d95495b81b52f15f4712ba062c404eb33ecc892b
Author: hidde.wieringa <hi...@nedap.com>
AuthorDate: Wed Jun 19 09:46:50 2019 +0200
DELTASPIKE-1383 Fix multiple threads causing NPE in Authorizer
---
.../org/apache/deltaspike/security/impl/extension/Authorizer.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/extension/Authorizer.java b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/extension/Authorizer.java
index bf90867..c348632 100644
--- a/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/extension/Authorizer.java
+++ b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/extension/Authorizer.java
@@ -208,16 +208,17 @@ class Authorizer
Method method = boundAuthorizerMethod.getJavaMember();
Set<Bean<?>> beans = beanManager.getBeans(method.getDeclaringClass());
- boundAuthorizerBean = beanManager.resolve(beans);
+ Bean<?> foundBoundAuthorizerBean = beanManager.resolve(beans);
- if (boundAuthorizerBean == null)
+ if (foundBoundAuthorizerBean == null)
{
throw new IllegalStateException("Exception looking up authorizer method bean - " +
"no beans found for method [" + method.getDeclaringClass() + "." +
method.getName() + "]");
}
- boundAuthorizerMethodProxy = new InjectableMethod(boundAuthorizerMethod, boundAuthorizerBean, beanManager);
+ boundAuthorizerMethodProxy = new InjectableMethod(boundAuthorizerMethod, foundBoundAuthorizerBean, beanManager);
+ boundAuthorizerBean = foundBoundAuthorizerBean;
}
}