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

CDI.setCDIProvider has different behavior than the javadoc states #618

Closed
manovotn opened this issue May 24, 2022 · 1 comment · Fixed by #619
Closed

CDI.setCDIProvider has different behavior than the javadoc states #618

manovotn opened this issue May 24, 2022 · 1 comment · Fixed by #619
Assignees
Milestone

Comments

@manovotn
Copy link
Contributor

CDI.setCDIProvider states that you can only set the provider once but the actual code doesn't check this at all.
Code link - https://github.com/jakartaee/cdi/blob/master/api/src/main/java/jakarta/enterprise/inject/spi/CDI.java#L120

The javadoc makes sense and the code should IMO adhere to it - there is no reason to change CDI provider during runtime.
Since this is behavioral change, we should fix it for next major.

This is also related to #617 since both APIs should work the same way so we should change both.

@Ladicek
Copy link
Contributor

Ladicek commented May 24, 2022

+1 to leaving this to next major. This piece of code is particularly susceptible to Hyrum's law in my opinion :-)

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 a pull request may close this issue.

2 participants