geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johndam...@apache.org
Subject svn commit: r1806730 - /geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/CDI.java
Date Wed, 30 Aug 2017 19:53:50 GMT
Author: johndament
Date: Wed Aug 30 19:53:50 2017
New Revision: 1806730

URL: http://svn.apache.org/viewvc?rev=1806730&view=rev
Log:
Throw IllegalStateException when provider is null.

Modified:
    geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/CDI.java

Modified: geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/CDI.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/CDI.java?rev=1806730&r1=1806729&r2=1806730&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/CDI.java
(original)
+++ geronimo/specs/trunk/geronimo-jcdi_2.0_spec/src/main/java/javax/enterprise/inject/spi/CDI.java
Wed Aug 30 19:53:50 2017
@@ -61,6 +61,10 @@ public abstract class CDI<T> implements
                 }
             }
         }
+        if (PROVIDER == null)
+        {
+            throw new IllegalStateException("Unable to locate a CDIProvider implementation");
+        }
         return PROVIDER.getCDI();
     }
 
@@ -77,7 +81,7 @@ public abstract class CDI<T> implements
     {
         if (provider == null)
         {
-            PROVIDER = null;
+            throw new IllegalStateException("CDIProvider must not be null");
         }
         else
         {



Mime
View raw message