Skip to content

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

@manovotn

Description

@manovotn

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions