openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1680825 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/AbstractInjectable.java
Date Thu, 21 May 2015 11:21:35 GMT
Author: rmannibucau
Date: Thu May 21 11:21:35 2015
New Revision: 1680825

URL: http://svn.apache.org/r1680825
Log:
avoid NPE if cc.getbean is null

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=1680825&r1=1680824&r2=1680825&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 May 21 11:21:35 2015
@@ -83,18 +83,10 @@ public abstract class AbstractInjectable
         
         //Injection for dependent instance InjectionPoint fields
         boolean dependentProducer = false;
-        if(WebBeansUtil.isDependent(injectedBean))
+        if(WebBeansUtil.isDependent(injectedBean) && !injectionPoint.isTransient()
&& injectedBean instanceof AbstractProducerBean
+                    && creationalContext.getBean() != null && beanManager.isPassivatingScope(creationalContext.getBean().getScope()))
         {
-            if(!injectionPoint.isTransient())
-            {
-                if(injectedBean instanceof AbstractProducerBean)
-                {
-                    if(beanManager.isPassivatingScope(creationalContext.getBean().getScope()))
-                    {
-                        dependentProducer = true;   
-                    }
-                }
-            }
+            dependentProducer = true;
         }
         
         CreationalContext<?> injectionPointContext;



Mime
View raw message