commit | ddc3238d706f9620895fe176377e9629449f2a3f | [log] [tgz] |
---|---|---|
author | John D. Ament <johndament@apache.org> | Wed Aug 30 19:53:50 2017 +0000 |
committer | John D. Ament <johndament@apache.org> | Wed Aug 30 19:53:50 2017 +0000 |
tree | 43bd32dc588dd859c7f803acd6fb5d562163d1bb | |
parent | 2018b7d665ab133a1b04e3cb36eb980d3862f877 [diff] |
Throw IllegalStateException when provider is null. git-svn-id: https://svn.apache.org/repos/asf/geronimo/specs/trunk@1806730 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/CDI.java b/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/CDI.java index 8652c71..ac55bc1 100644 --- a/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/CDI.java +++ b/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/CDI.java
@@ -61,6 +61,10 @@ } } } + if (PROVIDER == null) + { + throw new IllegalStateException("Unable to locate a CDIProvider implementation"); + } return PROVIDER.getCDI(); } @@ -77,7 +81,7 @@ { if (provider == null) { - PROVIDER = null; + throw new IllegalStateException("CDIProvider must not be null"); } else {