gharris1727 opened a new pull request, #13294:
URL: https://github.com/apache/kafka/pull/13294

   The RestClient accepts a TypeReference argument defining what kind of 
response to expect from the HTTP request.
   If these request is expected to result in a 204 no-content, they would 
previously not provide a TypeReference argument (null). If a request which 
normally resulted in a 204 returned some other 200 code, then the RestClient 
would experience an NPE when it tries to deserialize the nonempty response.
   
   Instead, we should enforce that the TypeReference is always provided to the 
RestClient. If we provide a TypeReference<Void> for the calls which do not 
expect to return content, then if they do receive content, that content will be 
silently dropped instead of causing an NPE.
   
   Adds new tests for enforcing non-null arguments, and confirms the behavior 
of a TypeReference<Void> call-site receiving a non-empty response.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to