-
Notifications
You must be signed in to change notification settings - Fork 932
Add null check for paginator hasNextPage #5139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add null check for paginator hasNextPage #5139
Conversation
@@ -169,7 +169,7 @@ protected MemberModel memberModelForResponseMember(String input) { | |||
protected CodeBlock hasNextPageMethodBody() { | |||
if (paginatorDefinition.getMoreResults() != null) { | |||
return CodeBlock.builder() | |||
.add("return $N.$L.booleanValue()", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Can we please write a codegen test with expected java class and codegen class?
- Also in what cases do we get this as Null ? Can we write a test case for the same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added tests
The service will always populate the field, but customer unit tests may not populate the more_results field in the response because it previously did not exist
|
* Add null check for paginator hasNextPage * Add codegen tests for more_results * Add hasNextPage null check for customized paginators * Add unit test for null more_results field
* Add null check for paginator hasNextPage * Add codegen tests for more_results * Add hasNextPage null check for customized paginators * Add unit test for null more_results field
Motivation and Context
Add null check for paginator
hasNextPage()
Modifications
Previous
Updated
Testing
Screenshots (if appropriate)
Types of changes
Checklist
mvn install
succeedsscripts/new-change
script and following the instructions. Commit the new file created by the script in.changes/next-release
with your changes.License