karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anierb...@apache.org
Subject svn commit: r1496022 - /karaf/trunk/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java
Date Mon, 24 Jun 2013 13:12:57 GMT
Author: anierbeck
Date: Mon Jun 24 13:12:56 2013
New Revision: 1496022

URL: http://svn.apache.org/r1496022
Log:
test fixes: checked for NPE ... 

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

Modified: karaf/trunk/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java
URL: http://svn.apache.org/viewvc/karaf/trunk/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java?rev=1496022&r1=1496021&r2=1496022&view=diff
==============================================================================
--- karaf/trunk/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java
(original)
+++ karaf/trunk/features/core/src/main/java/org/apache/karaf/features/internal/FeaturesServiceImpl.java
Mon Jun 24 13:12:56 2013
@@ -650,7 +650,12 @@ public class FeaturesServiceImpl impleme
 
         //Also remove bundles installed as conditionals
         for (Conditional conditional : feature.getConditional()) {
-            bundles.addAll(installed.remove(conditional.asFeature(feature.getName(),feature.getVersion())));
+            Feature conditionalFeature = conditional.asFeature(feature.getName(),feature.getVersion());
+            if (installed.containsKey(conditionalFeature)) {
+            	bundles.addAll(installed.remove(conditionalFeature));
+            } else {
+            	LOGGER.info("Conditional feature {}, hasn't been installed!");
+            }
         }
 
         for (Set<Long> b : installed.values()) {



Mime
View raw message