hachikuji commented on a change in pull request #10223:
URL: https://github.com/apache/kafka/pull/10223#discussion_r585017852



##########
File path: core/src/main/scala/kafka/server/KafkaApis.scala
##########
@@ -1874,7 +1874,7 @@ class KafkaApis(val requestChannel: RequestChannel,
         if (topic.name() != null && topic.topicId() != Uuid.ZERO_UUID)
           throw new InvalidRequestException("Topic name and topic ID can not 
both be specified.")
         val name = if (topic.topicId() == Uuid.ZERO_UUID) topic.name()
-        else 
zkSupport.controller.controllerContext.topicNames.getOrElse(topic.topicId(), 
null)
+        else 
zkSupport.controller.controllerContext.topicName(topic.topicId).orNull

Review comment:
       I mainly did this for easier mocking. I would like to see reduced access 
for `topicNames`, but that feels like something to address separately.




----------------------------------------------------------------
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:
[email protected]


Reply via email to