Re: [PR] Fix incorrect equals comparison of Uuid by reference [kafka]

2024-04-12 Thread via GitHub


chia7712 commented on code in PR #15707:
URL: https://github.com/apache/kafka/pull/15707#discussion_r1563600417


##
core/src/main/scala/kafka/server/AlterPartitionManager.scala:
##
@@ -270,7 +270,7 @@ class DefaultAlterPartitionManager(
 
 inflightAlterPartitionItems.groupBy(_.topicIdPartition.topic).foreach { 
case (topicName, items) =>
   val topicId = items.head.topicIdPartition.topicId
-  canUseTopicIds &= topicId != Uuid.ZERO_UUID
+  canUseTopicIds &= !topicId.equals(Uuid.ZERO_UUID)

Review Comment:
   IIRC, it calls the equals method on the first object in Scala. 



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



Re: [PR] Fix incorrect equals comparison of Uuid by reference [kafka]

2024-04-12 Thread via GitHub


alok123t commented on PR #15707:
URL: https://github.com/apache/kafka/pull/15707#issuecomment-2052621773

   i did smth similar to https://stackoverflow.com/a/73535824 to find all 
usages in the codebase


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