Skip to content
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

Closed
wants to merge 3 commits into from
Closed

WELD-2798 Secondary idea #3065

wants to merge 3 commits into from

Conversation

manovotn
Copy link
Contributor

@manovotn manovotn commented Oct 1, 2024

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.

@@ -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?
Copy link
Contributor Author

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

Comment on lines +345 to +342
for (Annotation ann : method.getAnnotations()) {
result.put(ann.annotationType(), method);
Copy link
Contributor Author

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

@manovotn
Copy link
Contributor Author

manovotn commented Oct 2, 2024

Closing as these changes are now included in the original PR - #3055

@manovotn manovotn closed this Oct 2, 2024
@manovotn manovotn deleted the weld2798_v2 branch October 2, 2024 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant