ijuma commented on code in PR #12967:
URL: https://github.com/apache/kafka/pull/12967#discussion_r1043889697


##########
core/src/main/scala/kafka/coordinator/group/GroupMetadata.scala:
##########
@@ -484,10 +484,7 @@ private[group] class GroupMetadata(val groupId: String, 
initialState: GroupState
    * group does not know, because the information is not available yet or 
because the it has
    * failed to parse the Consumer Protocol, it returns true to be safe.
    */
-  def isSubscribedToTopic(topic: String): Boolean = subscribedTopics match {
-    case Some(topics) => topics.contains(topic)
-    case None => true
-  }
+  def isSubscribedToTopic(topic: String): Boolean = 
subscribedTopics.forall(topics => topics.contains(topic))

Review Comment:
   How is this related to the PR description? Seems like an unrelated clean-up? 
Is your before/after test including these changes? Many of them _can_ result in 
additional allocations since you're replacing pattern matching with lambas.



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