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-2758 Proxies for non-public class-based beans should reside in bean's package if possible #2886

Merged
merged 1 commit into from Sep 26, 2023

Conversation

manovotn
Copy link
Contributor

@manovotn manovotn commented Sep 26, 2023

@manovotn
Copy link
Contributor Author

manovotn commented Sep 26, 2023

This seem to work fine although I noticed we might want to skip some cases (i.e. built-in beans).
While debugging it, I noticed that for instance our built-in bean for jakarta.transaction.UserTransaction is a package private class org.jboss.weld.module.jta.UserTransactionBean.
Using the code in this PR means we will try to define this bean directly into Weld's JTA module package.
This seems wrong but OTOH anything for jakarta.* or java.* package would end up in custom package (org.jboss.weld.generated.proxies) anyway 🤷

Note that for the attached test case, we'd normally try to place the proxy in the api package, where we detect the interface.

EDIT: I've added a condition to skip built-in beans

Copy link
Member

@mkouba mkouba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants