forked from loafle/openapi-generator-original
fix issue #1143: add another null check.
The problem was trying to iterate over a null list.
This commit is contained in:
parent
e3c6cc3220
commit
32ffab4519
@ -342,6 +342,8 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
continue;
|
continue;
|
||||||
List<String> values = (List<String>) allowableValues.get("values");
|
List<String> values = (List<String>) allowableValues.get("values");
|
||||||
// put "enumVars" map into `allowableValues", including `name` and `value`
|
// put "enumVars" map into `allowableValues", including `name` and `value`
|
||||||
|
if (values == null)
|
||||||
|
continue;
|
||||||
List<Map<String, String>> enumVars = new ArrayList<Map<String, String>>();
|
List<Map<String, String>> enumVars = new ArrayList<Map<String, String>>();
|
||||||
for (String value : values) {
|
for (String value : values) {
|
||||||
Map<String, String> enumVar = new HashMap<String, String>();
|
Map<String, String> enumVar = new HashMap<String, String>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user