felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1124285 - /felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/DependencyManager.java
Date Wed, 18 May 2011 14:34:33 GMT
Author: marrs
Date: Wed May 18 14:34:33 2011
New Revision: 1124285

URL: http://svn.apache.org/viewvc?rev=1124285&view=rev
Log:
FELIX-2955 Fixed the bug by making sure that only dependency managers that still have a valid
bundle context are returned.

Modified:
    felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/DependencyManager.java

Modified: felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/DependencyManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/DependencyManager.java?rev=1124285&r1=1124284&r2=1124285&view=diff
==============================================================================
--- felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/DependencyManager.java
(original)
+++ felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/DependencyManager.java
Wed May 18 14:34:33 2011
@@ -112,11 +112,15 @@ public class DependencyManager {
                 WeakReference reference = (WeakReference) iterator.next();
                 DependencyManager manager = (DependencyManager) reference.get();
                 if (manager != null) {
-                    result.add(manager);
-                }
-                else {
-                    iterator.remove();
+                    try {
+                        manager.getBundleContext().getBundle();
+                        result.add(manager);
+                        continue;
+                    }
+                    catch (IllegalStateException e) {
+                    }
                 }
+                iterator.remove();
             }
         }
         return result;



Mime
View raw message