felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r812386 - /felix/trunk/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java
Date Tue, 08 Sep 2009 08:34:02 GMT
Author: gnodet
Date: Tue Sep  8 08:34:01 2009
New Revision: 812386

URL: http://svn.apache.org/viewvc?rev=812386&view=rev
Log:
FELIX-1566: Possible NPE when uninstalling a feature

Modified:
    felix/trunk/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java

Modified: felix/trunk/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java?rev=812386&r1=812385&r2=812386&view=diff
==============================================================================
--- felix/trunk/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java
(original)
+++ felix/trunk/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java
Tue Sep  8 08:34:01 2009
@@ -301,7 +301,10 @@
             bundles.removeAll(b);
         }
         for (long bundleId : bundles) {
-            getBundleContext().getBundle(bundleId).uninstall();
+            Bundle b = getBundleContext().getBundle(bundleId);
+            if (b != null) {
+                b.uninstall();
+            }
         }
         callListeners(new FeatureEvent(feature, FeatureEvent.EventType.FeatureInstalled,
false));
         saveState();



Mime
View raw message