Merged from release_5_6 [from revision 22893]

PL-5859 Enumeration field should be required in AttributeEditor
#PL-5859
This commit is contained in:
Eugeny Degtyarjov 2015-08-25 06:00:31 +00:00
parent 7394aac19c
commit 98858e8163
2 changed files with 2 additions and 2 deletions

View File

@ -263,7 +263,7 @@ public class CategoryAttribute extends StandardEntity {
Preconditions.checkState(getDataType() == PropertyType.ENUMERATION, "Only enumeration attributes have options");
String enumeration = getEnumeration();
String[] values = StringUtils.split(enumeration, ',');
return Arrays.asList(values);
return values != null ? Arrays.asList(values) : Collections.<String>emptyList();
}
public String getEntityClass() {

View File

@ -33,7 +33,7 @@
<field id="lookup"/>
<field id="defaultEntityId" custom="true"/>
<field id="enumeration"/>
<field id="enumeration" required="true"/>
<field id="defaultString"/>
<field id="defaultInt"/>
<field id="defaultDouble"/>