-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WELD-2798 Secondary idea #3065
WELD-2798 Secondary idea #3065
Conversation
@@ -158,7 +144,18 @@ protected EnhancedAnnotatedTypeImpl(SlimAnnotatedType<T> annotatedType, | |||
this.superclass = classTransformer.getEnhancedAnnotatedType(superclass, slim.getIdentifier().getBdaId()); | |||
} | |||
} else { | |||
this.superclass = classTransformer.getEnhancedAnnotatedType(Object.class, AnnotatedTypeIdentifier.NULL_BDA_ID); | |||
// TODO do we need the try-catch block? Since the class comes from an extension, do we always have access to it superclasses? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am really not sure about this - we seemed to have been very deliberate in using Object
as superclass here
for (Annotation ann : method.getAnnotations()) { | ||
result.put(ann.annotationType(), method); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is not needed for the PR but fixes the inconsistency in the code - previously the collection of annotated methods only contained methods with certain annotations. This changes it to instead know about all annotated methods in given AT - which is what the API javadoc for EnhancedAnnotatedType#getEnhancedMethods(Class)
states to begin with
Closing as these changes are now included in the original PR - #3055 |
Serves to get a full CI run on this.
This fix aims to keep how Weld was working previously but changing the superclass of extension-based annotated types to their actually classes.