Skip to content

Conversation

@manovotn
Copy link
Contributor

@manovotn manovotn commented Feb 5, 2026

Fixes #939

Current wording of bean archive trimming is (emphasis mine):

If an explicit bean archive contains the element in its beans.xml file, types that don’t have either a bean defining annotation (as defined in Bean defining annotations) or any scope annotation, are removed from the set of discovered types.

This PR suggest a slight change to wording of BeforeBeanDiscovery/AfterTypeDiscovery#addAnnotatedType so that it is clearly implied that even added synthetic types are part of the 'set of discovered types' and hence subject to archive trimming.

Note that when it comes to BCE, there is ScannedClasses which already uses this kind of wording:

Allows adding additional classes to the set of types discovered during type discovery.

@Ladicek
Copy link
Member

Ladicek commented Feb 6, 2026

For the record, this PR looks good to me otherwise :-) If you feel like my wording is overly verbose, I think I can accept that, if we unify ScannedClasses :-)

@Ladicek Ladicek added this to the CDI 5.0 milestone Feb 6, 2026
…rchive trimming is worded.

This way, it should be clearly implied that archive trimming affects even annotated types added synthetically.
@manovotn
Copy link
Contributor Author

I have changed the wording as agreed.
This PR should be good to go now.

@manovotn
Copy link
Contributor Author

Thank you for reviews.
I have pushed the TCKs as well - jakartaee/cdi-tck#681

@manovotn manovotn merged commit 3b0a0bc into jakartaee:main Feb 10, 2026
4 checks passed
@manovotn manovotn deleted the issue939 branch February 10, 2026 18:08
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.

Clarify how bean archive trimming works for synthetic annotated types

3 participants