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:
Sodala
2017-07-17 13:10:54 +02:00
committed by wing328
parent 93415af92d
commit 24d7700cd0
2 changed files with 76 additions and 1 deletions

View File

@@ -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;
}