openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1460472 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java
Date Sun, 24 Mar 2013 21:43:41 GMT
Author: rmannibucau
Date: Sun Mar 24 21:43:41 2013
New Revision: 1460472

URL: http://svn.apache.org/r1460472
Log:
OWB-801 null instance shouldn't be destroyed

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java?rev=1460472&r1=1460471&r2=1460472&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContext.java
Sun Mar 24 21:43:41 2013
@@ -194,7 +194,11 @@ public abstract class AbstractContext im
             CreationalContext<Object> cc = (CreationalContext<Object>)instance.getBeanCreationalContext();
 
             //Destroy instance
-            destroyInstance((Contextual<Object>) contextual, instance.getBeanInstance(),
cc);
+            final Object beanInstance = instance.getBeanInstance();
+            if (beanInstance != null)
+            {
+                destroyInstance((Contextual<Object>) contextual, beanInstance, cc);
+            }
         }
         
         //Clear context map



Mime
View raw message