-
Bug
-
Resolution: Done
-
Major
-
1.1.16.Final
-
None
Scenario:
I'm trying to add an interceptor to a class in a third-party lib where I can't modify beans.xml.
As a workaround, I observe ProcessAnnotatedType in a portable extension to add an @Interceptors annotation to the given bean type.
Problem:
This causes an exception, apparently due to this piece of code in AbstractClassBean:
private void initClassDeclaredEjbInterceptors() { Class<?>[] classDeclaredInterceptors = null; if (getWeldAnnotated().isAnnotationPresent(...)) { Annotation interceptorsAnnotation = getType().getAnnotation(...); // ... } }
The CDI type model is checked for the presence of an annotation, but then the actual annotation is read from the raw class and not from the CDI model.