abbccdda commented on a change in pull request #9103: URL: https://github.com/apache/kafka/pull/9103#discussion_r504327985
########## File path: clients/src/main/java/org/apache/kafka/common/requests/CreateTopicsResponse.java ########## @@ -70,9 +70,12 @@ public int throttleTimeMs() { @Override public Map<Errors, Integer> errorCounts() { HashMap<Errors, Integer> counts = new HashMap<>(); - data.topics().forEach(result -> - updateErrorCounts(counts, Errors.forCode(result.errorCode())) - ); + for (CreateTopicsResponseData.CreatableTopicResult result : data.topics()) { + Errors error = Errors.forCode(result.errorCode()); + if (error != Errors.NONE) { Review comment: I guess there are some inconsistency between different RPCs as I spotted cases excluding NONE. I would initiate a separate JIRA for the cleaning and revert the change here. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org