zzbennett commented on code in PR #20061:
URL: https://github.com/apache/kafka/pull/20061#discussion_r2178757115


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorService.java:
##########
@@ -1921,14 +1921,14 @@ private 
CompletableFuture<DeleteShareGroupOffsetsResponseData> handleDeleteShare
                 errorTopicResponses.add(
                     new 
DeleteShareGroupOffsetsResponseData.DeleteShareGroupOffsetsResponseTopic()
                         .setTopicId(topicData.topicId())
-                        
.setTopicName(metadataImage.topics().topicIdToNameView().get(topicData.topicId()))
+                        
.setTopicName(metadataImage.topicName(topicData.topicId()).orElse(null))

Review Comment:
   It probably wouldn't ever happen but returning null at least matches the 
current behavior and avoids throwing an exception if the Optional is empty



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