Skip to content

Commit e48cbcf

Browse files
committed
refactor kafkaApis
1 parent 0f1878d commit e48cbcf

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

core/src/main/scala/kafka/server/KafkaApis.scala

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -789,11 +789,7 @@ class KafkaApis(val requestChannel: RequestChannel,
789789
val known = new util.ArrayList[ListOffsetsTopic]()
790790
val unknown = new util.ArrayList[ListOffsetsTopicResponse]()
791791
offsetRequest.topics.asScala.foreach { topic =>
792-
val topicName = if (topic.topicId() != null && topic.topicId() != Uuid.ZERO_UUID) {
793-
metadataCache.getTopicName(topic.topicId()).orElse(null)
794-
} else {
795-
topic.name()
796-
}
792+
val topicName = metadataCache.getTopicName(topic.topicId()).orElse(null)
797793

798794
if (topicName == null) {
799795
// Topic ID cannot be resolved to a name

0 commit comments

Comments
 (0)