karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject [3/3] karaf git commit: [KARAF-5314] Only recurse into dependencies once per feature
Date Mon, 21 Aug 2017 08:25:05 GMT
[KARAF-5314] Only recurse into dependencies once per feature


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/5a8133db
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/5a8133db
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/5a8133db

Branch: refs/heads/master
Commit: 5a8133dbbfe7ede7366bcb943e2bd04937d8eff5
Parents: 0ed141d
Author: Christian Schneider <chris@die-schneider.net>
Authored: Sun Aug 20 16:20:09 2017 +0200
Committer: Christian Schneider <chris@die-schneider.net>
Committed: Sun Aug 20 16:20:09 2017 +0200

----------------------------------------------------------------------
 .../org/apache/karaf/profile/assembly/FeatureSelector.java    | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/5a8133db/profile/src/main/java/org/apache/karaf/profile/assembly/FeatureSelector.java
----------------------------------------------------------------------
diff --git a/profile/src/main/java/org/apache/karaf/profile/assembly/FeatureSelector.java
b/profile/src/main/java/org/apache/karaf/profile/assembly/FeatureSelector.java
index 1e453d6..156cb46 100644
--- a/profile/src/main/java/org/apache/karaf/profile/assembly/FeatureSelector.java
+++ b/profile/src/main/java/org/apache/karaf/profile/assembly/FeatureSelector.java
@@ -55,9 +55,10 @@ public class FeatureSelector {
             throw new IllegalStateException("Could not find matching feature for " + feature);
         }
         for (Feature f : set) {
-            features.add(f);
-            for (Dependency dep : f.getFeature()) {
-                addFeatures(dep.toString(), features, isMandatory(dep));
+            if (features.add(f)) {
+                for (Dependency dep : f.getFeature()) {
+                    addFeatures(dep.toString(), features, isMandatory(dep));
+                }
             }
         }
     }


Mime
View raw message