Skip to content

Commit f93bfea

Browse files
committed
fix(#OWB-1450): remove non working cache on proxies per AT
1 parent cdc9a57 commit f93bfea

2 files changed

Lines changed: 1 addition & 14 deletions

File tree

webbeans-impl/src/main/java/org/apache/webbeans/container/InterceptionFactoryImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public T createInterceptedInstance(T originalInstance)
8383
InterceptorResolutionService.BeanInterceptorInfo interceptorInfo =
8484
context.getInterceptorResolutionService()
8585
.calculateInterceptorInfo(newAnnotatedType.getTypeClosure(), qualifiers, newAnnotatedType, !ignoreFinals);
86-
Class<T> subClass = factory.getCachedProxyClass(interceptorInfo, newAnnotatedType, classLoader);
86+
Class<T> subClass = factory.createProxyClass(interceptorInfo, newAnnotatedType, classLoader);
8787

8888
Map<Interceptor<?>,Object> interceptorInstances = context.getInterceptorResolutionService()
8989
.createInterceptorInstances(interceptorInfo, creationalContext);

webbeans-impl/src/main/java/org/apache/webbeans/proxy/InterceptorDecoratorProxyFactory.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ public class InterceptorDecoratorProxyFactory extends AbstractProxyFactory
6767
* We need this to prevent filling up the ClassLoaders by
6868
*/
6969
private ConcurrentMap<Bean<?>, Class<?>> cachedProxyClasses = new ConcurrentHashMap<>();
70-
private ConcurrentMap<AnnotatedType<?>, Class<?>> cachedProxyClassesByAt = new ConcurrentHashMap<>();
7170

7271

7372
public InterceptorDecoratorProxyFactory(WebBeansContext webBeansContext)
@@ -191,7 +190,6 @@ public synchronized <T> Class<T> createProxyClass(InterceptorResolutionService.B
191190
Class<T> proxyClass = createProxyClass(
192191
classLoader, at.getJavaClass(),
193192
intercepted.toArray(new Method[intercepted.size()]), others.toArray(new Method[others.size()]));
194-
cachedProxyClassesByAt.put(at, proxyClass);
195193
return proxyClass;
196194
}
197195

@@ -221,17 +219,6 @@ private <T> Class<T> createProxyClass(ClassLoader classLoader, Class<T> classToP
221219
return clazz;
222220
}
223221

224-
public <T> Class<T> getCachedProxyClass(InterceptorResolutionService.BeanInterceptorInfo interceptorInfo,
225-
AnnotatedType<T> at, ClassLoader classLoader)
226-
{
227-
Class<T> value = (Class<T>) cachedProxyClassesByAt.get(at);
228-
if (value == null)
229-
{
230-
value = createProxyClass(interceptorInfo, at, classLoader);
231-
}
232-
return value;
233-
}
234-
235222
public <T> Class<T> getCachedProxyClass(Bean<T> bean)
236223
{
237224
return (Class<T>) cachedProxyClasses.get(bean);

0 commit comments

Comments
 (0)