Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api/src/main/java/jakarta/enterprise/inject/Instance.java
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ interface Handle<T> extends AutoCloseable {
* @return the contextual reference
* @see Instance#get()
* @throws IllegalStateException If the producing {@link Instance} does not exist
* @throws IllegalStateException If invoked on {@link Handle} that previously successfully destroyed its
* underlying contextual reference
*/
T get();

Expand Down
3 changes: 2 additions & 1 deletion spec/src/main/asciidoc/core/injectionandresolution.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,8 @@ public interface Handle<T> extends AutoCloseable {
}
----

The `get()` method returns a contextual reference object. The contextual reference is resolved lazily.
The `get()` method returns a contextual reference object. The contextual reference is resolved lazily. Throws
`IllegalStateException` if invoked on `Handle` that previously successfully destroyed its underlying contextual reference.

The `getBean()` method returns the `Bean` object representing metadata of the given contextual instance.

Expand Down