mumrah commented on a change in pull request #11029:
URL: https://github.com/apache/kafka/pull/11029#discussion_r673368184
##########
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:
There's just two usages of this constructor and they cannot provide
nulls, so we can probably live without the null check
--
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]