diff --git a/backend/manager/tools/src/main/java/org/ovirt/engine/core/config/entity/ConfigKeyFactory.java b/backend/manager/tools/src/main/java/org/ovirt/engine/core/config/entity/ConfigKeyFactory.java index 710844e48d5..4de9edb7ea3 100644 --- a/backend/manager/tools/src/main/java/org/ovirt/engine/core/config/entity/ConfigKeyFactory.java +++ b/backend/manager/tools/src/main/java/org/ovirt/engine/core/config/entity/ConfigKeyFactory.java @@ -2,6 +2,7 @@ import java.sql.ResultSet; import java.sql.SQLException; +import java.util.List; import java.util.Map; import org.apache.commons.lang.StringUtils; @@ -42,7 +43,13 @@ public ConfigKey generateByPropertiesKey(String key) { if (StringUtils.isBlank(type)) { type = "String"; } - String[] validValues = node.findValuesAsText("validValues").toArray(new String[0]); + + String[] validValues = null; + List parsedValue = node.findValuesAsText("validValues"); + if (!parsedValue.isEmpty()) { + // not all existing options have validValues defined + validValues = parsedValue.get(0).split(","); + } // Description containing the list delimiter *will* be broken into an array, so rejoin it using that delimiter. // We pad the separator because the strings in the array are trimmed automatically.