added check, fix for #1103

This commit is contained in:
Tony Tam
2015-08-21 15:02:56 -07:00
parent b68beefa69
commit 44b4af0374
2 changed files with 17 additions and 2 deletions

View File

@@ -636,7 +636,9 @@ public class DefaultCodegen {
if (np.getMaximum() != null) {
allowableValues.put("max", np.getMaximum());
}
property.allowableValues = allowableValues;
if(allowableValues.size() > 0) {
property.allowableValues = allowableValues;
}
}
if (p instanceof StringProperty) {