openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r1467031 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/AbstractInjectable.java
Date Thu, 11 Apr 2013 18:16:25 GMT
Author: gpetracek
Date: Thu Apr 11 18:16:24 2013
New Revision: 1467031

URL: http://svn.apache.org/r1467031
Log:
OWB-819 null check

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/AbstractInjectable.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/AbstractInjectable.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/AbstractInjectable.java?rev=1467031&r1=1467030&r2=1467031&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/AbstractInjectable.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/AbstractInjectable.java
Thu Apr 11 18:16:24 2013
@@ -90,11 +90,16 @@ public abstract class AbstractInjectable
                     }
                 }
             }
-        }        
+        }
 
         //Gets injectable reference for injected bean
         injected = (T) beanManager.getInjectableReference(injectionPoint, creationalContext);
 
+        if (injected == null && beanManager.isNormalScope(injectedBean.getScope()))
+        {
+            throw new IllegalStateException("InjectableReference is 'null' for " + injectionPoint.toString());
+        }
+
         /*X TODO see spec issue CDI-140 */
         if(dependentProducer)
         {



Mime
View raw message