Merge pull request #3679 from stianst/KEYCLOAK-4110

KEYCLOAK-4110
This commit is contained in:
Stian Thorgersen 2016-12-20 14:03:56 +01:00 committed by GitHub
commit f9bccc83f9

View file

@ -45,11 +45,11 @@ public class ConfigurationValidationHelper {
checkSingle(property.getName(), property.getLabel(), required);
String value = model.getConfig().getFirst(property.getName());
if (value != null && !property.options.contains(value)) {
if (value != null && !property.getOptions().contains(value)) {
StringBuilder options = new StringBuilder();
int i = 1;
for (String o : property.options) {
if (i == property.options.size()) {
for (String o : property.getOptions()) {
if (i == property.getOptions().size()) {
options.append(" or ");
} else if (i > 1) {
options.append(", ");
@ -57,7 +57,7 @@ public class ConfigurationValidationHelper {
options.append(o);
i++;
}
throw new ComponentValidationException("''{0}'' should be {1}", property.label, options.toString());
throw new ComponentValidationException("''{0}'' should be {1}", property.getLabel(), options.toString());
}
return this;