felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
Subject svn commit: r1056666 - /felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/InstanceManager.java
Date Sat, 08 Jan 2011 08:55:05 GMT
Author: clement
Date: Sat Jan  8 08:55:04 2011
New Revision: 1056666

URL: http://svn.apache.org/viewvc?rev=1056666&view=rev
Log:
Avoid cleaning registration maps when an instance is disposed. This avoids the injection of
null when a callback is called after the instance destruction.

Modified:
    felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/InstanceManager.java

Modified: felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/InstanceManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/InstanceManager.java?rev=1056666&r1=1056665&r2=1056666&view=diff
==============================================================================
--- felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/InstanceManager.java (original)
+++ felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/InstanceManager.java Sat Jan
 8 08:55:04 2011
@@ -430,11 +430,9 @@ public class InstanceManager implements 
 
         synchronized (this) {
             m_factory.disposed(this);
-            m_fields.clear();
-            m_fieldRegistration = new HashMap();
-            m_methodRegistration = new HashMap();
-            m_constructorRegistration = new HashMap();
             m_clazz = null;
+            // Do not clean registration map, so injection still works
+            // after disposal for late callbacks.
         }
     }
 
@@ -1062,7 +1060,6 @@ public class InstanceManager implements 
                 list[i].onSet(null, fieldName, result);
             }
         }
-
         return result;
     }
 



Mime
View raw message