This is an automated email from the ASF dual-hosted git repository.
struberg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwebbeans.git
The following commit(s) were added to refs/heads/master by this push:
new 53984f5 OWB-1332 fix packageVetoCache
53984f5 is described below
commit 53984f5a89b1673fe15b1b4067c5f735b0766aa0
Author: Mark Struberg <[email protected]>
AuthorDate: Tue Jun 16 14:02:54 2020 +0200
OWB-1332 fix packageVetoCache
---
.../org/apache/webbeans/config/BeansDeployer.java | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git
a/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
b/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
index 5575472..3ac1dd9 100644
--- a/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
+++ b/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
@@ -1378,22 +1378,23 @@ public class BeansDeployer
{
// yes we cache result with potentially different classloader but
this is not portable by spec
String name = pckge.getName();
+ Boolean packageVetoed = packageVetoCache.get(name);
+ if (packageVetoed == null)
{
- Boolean result = packageVetoCache.get(name);
- if (result != null && result)
+ if (pckge.getAnnotation(Vetoed.class) != null)
{
- return result;
+ packageVetoCache.put(pckge.getName(), true);
+ return true;
+ }
+ else
+ {
+ packageVetoCache.put(pckge.getName(), false);
}
}
- if (pckge.getAnnotation(Vetoed.class) != null)
+ else if (packageVetoed)
{
- packageVetoCache.put(pckge.getName(), true);
return true;
}
- else
- {
- packageVetoCache.put(pckge.getName(), false);
- }
int idx = name.lastIndexOf('.');
if (idx > 0)