geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hanhongf...@apache.org
Subject svn commit: r1165151 - /geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/DependencyManager.java
Date Mon, 05 Sep 2011 02:49:21 GMT
Author: hanhongfang
Date: Mon Sep  5 02:49:20 2011
New Revision: 1165151

URL: http://svn.apache.org/viewvc?rev=1165151&view=rev
Log:
GERONIMO-6144 NPE in DependencyManager if configurations/bundles are uninstalled

Modified:
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/DependencyManager.java

Modified: geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/DependencyManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/DependencyManager.java?rev=1165151&r1=1165150&r2=1165151&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/DependencyManager.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/DependencyManager.java
Mon Sep  5 02:49:20 2011
@@ -141,7 +141,10 @@ public class DependencyManager implement
         }
         List<Bundle> dependentBundles = new ArrayList<Bundle>(dependentBundleIds.size());
         for (Long dependentBundleId : dependentBundleIds) {
-            dependentBundles.add(bundleContext.getBundle(dependentBundleId));
+            Bundle b = bundleContext.getBundle(dependentBundleId);
+            if (b!=null) {
+                dependentBundles.add(b);
+            }
         }
         return dependentBundles;
     }
@@ -162,7 +165,10 @@ public class DependencyManager implement
         }
         Set<Bundle> dependentBundles = new HashSet<Bundle>(fullDependentBundleIds.size());
         for (Long dependentBundleId : fullDependentBundleIds) {
-            dependentBundles.add(bundleContext.getBundle(dependentBundleId));
+            Bundle b = bundleContext.getBundle(dependentBundleId);
+            if (b!=null) {
+                dependentBundles.add(b);
+            }
         }
         return dependentBundles;
     }



Mime
View raw message