AndrewJSchofield commented on code in PR #18232: URL: https://github.com/apache/kafka/pull/18232#discussion_r1898435818
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/FetchMetricsManager.java: ########## @@ -24,15 +24,18 @@ import org.apache.kafka.common.metrics.stats.WindowedCount; import java.util.Collections; -import java.util.HashMap; import java.util.Map; import java.util.Set; +import static org.apache.kafka.common.utils.Utils.mkEntry; +import static org.apache.kafka.common.utils.Utils.mkMap; + /** * The {@link FetchMetricsManager} class provides wrapper methods to record lag, lead, latency, and fetch metrics. * It keeps an internal ID of the assigned set of partitions which is updated to ensure the set of metrics it * records matches up with the topic-partitions in use. */ +@SuppressWarnings("deprecation") Review Comment: I don't believe this suppression has any value because it's implementing deprecated code, as opposed to using it. ########## clients/src/test/java/org/apache/kafka/clients/consumer/internals/FetchMetricsManagerTest.java: ########## @@ -32,18 +33,19 @@ import org.junit.jupiter.api.Test; import java.util.Map; +import java.util.Set; import static org.apache.kafka.clients.consumer.internals.FetchMetricsManager.topicPartitionTags; import static org.apache.kafka.clients.consumer.internals.FetchMetricsManager.topicTags; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; public class FetchMetricsManagerTest { Review Comment: I have a suspicion you put the suppression on `FetchMetricsManager` when I meant to put it on this test. -- 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