This is an automated email from the ASF dual-hosted git repository. jlmonteiro pushed a commit to branch owb_2.0.x in repository https://gitbox.apache.org/repos/asf/openwebbeans.git
commit f93bfea822251c851f0220169ebf65279729ac51 Author: Jean-Louis Monteiro <[email protected]> AuthorDate: Wed May 14 13:54:05 2025 +0200 fix(#OWB-1450): remove non working cache on proxies per AT --- .../apache/webbeans/container/InterceptionFactoryImpl.java | 2 +- .../webbeans/proxy/InterceptorDecoratorProxyFactory.java | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/webbeans-impl/src/main/java/org/apache/webbeans/container/InterceptionFactoryImpl.java b/webbeans-impl/src/main/java/org/apache/webbeans/container/InterceptionFactoryImpl.java index 8dbbf214e..3064902d3 100644 --- a/webbeans-impl/src/main/java/org/apache/webbeans/container/InterceptionFactoryImpl.java +++ b/webbeans-impl/src/main/java/org/apache/webbeans/container/InterceptionFactoryImpl.java @@ -83,7 +83,7 @@ public class InterceptionFactoryImpl<T> implements InterceptionFactory<T> /*todo InterceptorResolutionService.BeanInterceptorInfo interceptorInfo = context.getInterceptorResolutionService() .calculateInterceptorInfo(newAnnotatedType.getTypeClosure(), qualifiers, newAnnotatedType, !ignoreFinals); - Class<T> subClass = factory.getCachedProxyClass(interceptorInfo, newAnnotatedType, classLoader); + Class<T> subClass = factory.createProxyClass(interceptorInfo, newAnnotatedType, classLoader); Map<Interceptor<?>,Object> interceptorInstances = context.getInterceptorResolutionService() .createInterceptorInstances(interceptorInfo, creationalContext); diff --git a/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java b/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java index 5b8f8210f..3175a6770 100644 --- a/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java +++ b/webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java @@ -67,7 +67,6 @@ public class InterceptorDecoratorProxyFactory extends AbstractProxyFactory * We need this to prevent filling up the ClassLoaders by */ private ConcurrentMap<Bean<?>, Class<?>> cachedProxyClasses = new ConcurrentHashMap<>(); - private ConcurrentMap<AnnotatedType<?>, Class<?>> cachedProxyClassesByAt = new ConcurrentHashMap<>(); public InterceptorDecoratorProxyFactory(WebBeansContext webBeansContext) @@ -191,7 +190,6 @@ public class InterceptorDecoratorProxyFactory extends AbstractProxyFactory Class<T> proxyClass = createProxyClass( classLoader, at.getJavaClass(), intercepted.toArray(new Method[intercepted.size()]), others.toArray(new Method[others.size()])); - cachedProxyClassesByAt.put(at, proxyClass); return proxyClass; } @@ -221,17 +219,6 @@ public class InterceptorDecoratorProxyFactory extends AbstractProxyFactory return clazz; } - public <T> Class<T> getCachedProxyClass(InterceptorResolutionService.BeanInterceptorInfo interceptorInfo, - AnnotatedType<T> at, ClassLoader classLoader) - { - Class<T> value = (Class<T>) cachedProxyClassesByAt.get(at); - if (value == null) - { - value = createProxyClass(interceptorInfo, at, classLoader); - } - return value; - } - public <T> Class<T> getCachedProxyClass(Bean<T> bean) { return (Class<T>) cachedProxyClasses.get(bean);
