Only recurse into dependencies once per feature
@@ -55,12 +55,13 @@ public class FeatureSelector {
throw new IllegalStateException("Could not find matching feature for " + feature);
}
for (Feature f : set) {
- features.add(f);
+ if (features.add(f)) {
for (Dependency dep : f.getFeature()) {
addFeatures(dep.toString(), features, isMandatory(dep));
}
}
}
+ }
private boolean isMandatory(Dependency dep) {
return !dep.isDependency() && !dep.isPrerequisite();
