fix issue #1143: add another null check.

The problem was trying to iterate over a null list.
This commit is contained in:
Paul Ebermann 2015-08-27 19:17:40 +02:00
parent e3c6cc3220
commit 32ffab4519

View File

@ -342,6 +342,8 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
continue;
List<String> values = (List<String>) allowableValues.get("values");
// put "enumVars" map into `allowableValues", including `name` and `value`
if (values == null)
continue;
List<Map<String, String>> enumVars = new ArrayList<Map<String, String>>();
for (String value : values) {
Map<String, String> enumVar = new HashMap<String, String>();