Skip to content

Commit

Permalink
CDI.current() should throw ISE if no container is available
Browse files Browse the repository at this point in the history
- resolves #2710
  • Loading branch information
mkouba authored and gsmet committed Jun 6, 2019
1 parent f908fd0 commit 43a66e4
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public ArcCDIProvider() {

@Override
public CDI<Object> getCDI() {
if (Arc.container() == null) {
throw new IllegalStateException("No CDI container is available");
}
return arcCDI;
}

Expand Down

0 comments on commit 43a66e4

Please sign in to comment.