m1a2st commented on code in PR #19679:
URL: https://github.com/apache/kafka/pull/19679#discussion_r2083777217


##########
metadata/src/test/java/org/apache/kafka/image/TopicsImageTest.java:
##########
@@ -446,7 +446,7 @@ public void testClearElrRecordForNonExistTopic() {
 
     @Test
     public void testTopicDeltaElectionStatsWithEmptyImage() {
-        TopicImage image = new TopicImage("topic", Uuid.randomUuid(), 
Collections.EMPTY_MAP);
+        TopicImage image = new TopicImage("topic", Uuid.randomUuid(), 
Collections.<Integer, PartitionRegistration>emptyMap());

Review Comment:
   `Collections.emptyMap()` is part of the older Java API, while `Map.of()` is 
the modern alternative. Since other PRs are also cleaning up the legacy API 
usage, we should avoid using the old API in new code.



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