forked from loafle/openapi-generator-original
fix npe :Unboxing of '(count < numVars) ? true : null' produce npe (#5917)
* fix npe :Unboxing of '(count < numVars) ? true : null' may produce 'java.lang.NullPointerException * add test to cover reconcileInlineEnums method.
This commit is contained in:
@@ -555,7 +555,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
|
||||
int count = 0, numVars = codegenProperties.size();
|
||||
for(CodegenProperty codegenProperty : codegenProperties) {
|
||||
count += 1;
|
||||
codegenProperty.hasMore = (count < numVars) ? true : null;
|
||||
codegenProperty.hasMore = count < numVars;
|
||||
}
|
||||
codegenModel.vars = codegenProperties;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user