commit | 557d551a94c964947fb906a2c62fb79fa4c27a40 | [log] [tgz] |
---|---|---|
author | Guillaume Nodet <gnodet@apache.org> | Tue Sep 08 08:34:01 2009 +0000 |
committer | Guillaume Nodet <gnodet@apache.org> | Tue Sep 08 08:34:01 2009 +0000 |
tree | ea90a68d302225f460c2e61bc0ca70774632bf40 | |
parent | 97840a86f5d653e6999b27839e1bc36a3e25074c [diff] |
FELIX-1566: Possible NPE when uninstalling a feature git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@812386 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java b/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java index af683d7..421de12 100644 --- a/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java +++ b/karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java
@@ -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();