only install if name is not blank
Signed-off-by: Kai Kreuzer <kai@openhab.org>pull/2/head
parent
441e0ca57b
commit
c426779005
|
@ -12,6 +12,7 @@ import java.util.Map;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
|
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.karaf.features.Feature;
|
import org.apache.karaf.features.Feature;
|
||||||
import org.apache.karaf.features.FeaturesService;
|
import org.apache.karaf.features.FeaturesService;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -68,8 +69,10 @@ public class FeatureInstaller {
|
||||||
|
|
||||||
private void installFeatures(String type, String install) {
|
private void installFeatures(String type, String install) {
|
||||||
for (String addon : install.split(",")) {
|
for (String addon : install.split(",")) {
|
||||||
String name = PREFIX + type + "-" + addon.trim();
|
if (StringUtils.isNotBlank(addon)) {
|
||||||
installFeature(name);
|
String name = PREFIX + type + "-" + addon.trim();
|
||||||
|
installFeature(name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue