Details
-
Clarification
-
Resolution: Done
-
Major
-
1.2.Final
-
None
-
None
Description
5.6.1. The Instance interface:
The method destroy() instructs the container to destroy the instance. The bean instance passed to destroy() should be a dependent scoped bean instance, or...
I think this should be more obvious. E.g. this wouldn't work correctly even though it doesn't violate the spec:
@Dependent class Bar { } class Foo { @Inject Instance<Bar> instance; void ping() { instance.destroy(CDI.current().select(Bar.class).get()); } }
Attachments
Issue Links
- is duplicated by
-
CDI-594 Instance#destroy should be linked to Instance instance which has been used for the creation
- Closed