dengziming commented on a change in pull request #9769:
URL: https://github.com/apache/kafka/pull/9769#discussion_r556177548



##########
File path: 
clients/src/main/java/org/apache/kafka/common/requests/MetadataResponse.java
##########
@@ -91,7 +91,7 @@ public int throttleTimeMs() {
     public Map<String, Errors> errors() {
         Map<String, Errors> errors = new HashMap<>();
         for (MetadataResponseTopic metadata : data.topics()) {
-            if (metadata.errorCode() != Errors.NONE.code())
+            if (metadata.errorCode() != Errors.NONE.code() && metadata.name() 
!= null)

Review comment:
       Firstly I want to leave those check to callers, now I think it's better 
to throw an exception, So I add another method errorsByTopicId.




----------------------------------------------------------------
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


Reply via email to