mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
Merge pull request #2 from kaikreuzer/empty
only install feature if name is not blank
This commit is contained in:
+5
-2
@@ -12,6 +12,7 @@ import java.util.Map;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.karaf.features.Feature;
|
||||
import org.apache.karaf.features.FeaturesService;
|
||||
import org.slf4j.Logger;
|
||||
@@ -68,8 +69,10 @@ public class FeatureInstaller {
|
||||
|
||||
private void installFeatures(String type, String install) {
|
||||
for (String addon : install.split(",")) {
|
||||
String name = PREFIX + type + "-" + addon.trim();
|
||||
installFeature(name);
|
||||
if (StringUtils.isNotBlank(addon)) {
|
||||
String name = PREFIX + type + "-" + addon.trim();
|
||||
installFeature(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user