aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r1154408 - /aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BeanRecipe.java
Date Fri, 05 Aug 2011 22:42:46 GMT
Author: not
Date: Fri Aug  5 22:42:46 2011
New Revision: 1154408

URL: http://svn.apache.org/viewvc?rev=1154408&view=rev
Log:
ARIES-721 Only lookup the destroy method if we have a valid object to destroy.

Modified:
    aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BeanRecipe.java

Modified: aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BeanRecipe.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BeanRecipe.java?rev=1154408&r1=1154407&r2=1154408&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BeanRecipe.java
(original)
+++ aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/BeanRecipe.java
Fri Aug  5 22:42:46 2011
@@ -556,7 +556,7 @@ public class BeanRecipe extends Abstract
      */
     public Method getDestroyMethod(Object instance) throws ComponentDefinitionException {
         Method method = null;        
-        if (destroyMethod != null && destroyMethod.length() > 0) {
+        if (instance != null && destroyMethod != null && destroyMethod.length()
> 0) {
             method = ReflectionUtils.getLifecycleMethod(instance.getClass(), destroyMethod);
             if (method == null) {
                 throw new ComponentDefinitionException("Component '" + getName() + "' does
not have destroy-method: " + destroyMethod);



Mime
View raw message