chia7712 commented on a change in pull request #11029:
URL: https://github.com/apache/kafka/pull/11029#discussion_r671638916
##########
File path:
core/src/main/scala/kafka/server/metadata/BrokerMetadataPublisher.scala
##########
@@ -46,8 +46,10 @@ object BrokerMetadataPublisher {
def getTopicDelta(topicName: String,
newImage: MetadataImage,
delta: MetadataDelta): Option[TopicDelta] = {
- Option(newImage.topics().getTopic(topicName)).map {
- topicImage => delta.topicsDelta().changedTopic(topicImage.id())
+ Option(newImage.topics().getTopic(topicName)).flatMap {
Review comment:
Is `newImage.topics()` never null? If so, should we add null check to
constructor of `MetadataImage` to make sure input arguments are NOT null.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]