This is an automated email from the ASF dual-hosted git repository.

mjsax pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new d4cb9217399 MINOR: cleanup build warnings (#21459)
d4cb9217399 is described below

commit d4cb921739992c40f8c5967fa33344d03a820bd2
Author: Matthias J. Sax <[email protected]>
AuthorDate: Sat Feb 14 14:14:39 2026 -0800

    MINOR: cleanup build warnings (#21459)
    
    Reviewers: Chia-Ping Tsai <[email protected]>
---
 .../org/apache/kafka/connect/runtime/WorkerSinkTaskTest.java  | 11 ++++++-----
 .../coordinator/common/runtime/CoordinatorRuntimeTest.java    |  1 +
 .../kafka/coordinator/group/streams/StreamsGroupTest.java     |  1 +
 .../test/java/org/apache/kafka/server/KRaftClusterTest.java   |  1 +
 4 files changed, 9 insertions(+), 5 deletions(-)

diff --git 
a/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerSinkTaskTest.java
 
b/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerSinkTaskTest.java
index c29831a9580..4815b79019c 100644
--- 
a/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerSinkTaskTest.java
+++ 
b/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerSinkTaskTest.java
@@ -193,7 +193,7 @@ public class WorkerSinkTaskTest {
         createTask(initialState, keyConverter, valueConverter, 
headerConverter);
     }
 
-    private void createTask(TargetState initialState, TransformationChain 
transformationChain, RetryWithToleranceOperator toleranceOperator) {
+    private void createTask(TargetState initialState, 
TransformationChain<ConsumerRecord<byte[], byte[]>, SinkRecord> 
transformationChain, RetryWithToleranceOperator<ConsumerRecord<byte[], byte[]>> 
toleranceOperator) {
         createTask(initialState, keyConverter, valueConverter, 
headerConverter, toleranceOperator, List::of, transformationChain);
     }
 
@@ -925,8 +925,8 @@ public class WorkerSinkTaskTest {
 
     @Test
     public void testRaisesFailedRetriableExceptionFromTransform() {
-        RetryWithToleranceOperator<RetriableException> 
retryWithToleranceOperator = RetryWithToleranceOperatorTest.noneOperator();
-        TransformationChain<RetriableException, SinkRecord> 
transformationChainRetriableException = getTransformationChain(
+        RetryWithToleranceOperator<ConsumerRecord<byte[], byte[]>> 
retryWithToleranceOperator = RetryWithToleranceOperatorTest.noneOperator();
+        TransformationChain<ConsumerRecord<byte[], byte[]>, SinkRecord> 
transformationChainRetriableException = getTransformationChain(
                 retryWithToleranceOperator, List.of(new 
RetriableException("Test")));
         createTask(initialState, transformationChainRetriableException, 
retryWithToleranceOperator);
 
@@ -950,8 +950,8 @@ public class WorkerSinkTaskTest {
 
     @Test
     public void testSkipsFailedRetriableExceptionFromTransform() {
-        RetryWithToleranceOperator<RetriableException> 
retryWithToleranceOperator = RetryWithToleranceOperatorTest.allOperator();
-        TransformationChain<RetriableException, SinkRecord> 
transformationChainRetriableException = getTransformationChain(
+        RetryWithToleranceOperator<ConsumerRecord<byte[], byte[]>> 
retryWithToleranceOperator = RetryWithToleranceOperatorTest.allOperator();
+        TransformationChain<ConsumerRecord<byte[], byte[]>, SinkRecord> 
transformationChainRetriableException = getTransformationChain(
                 retryWithToleranceOperator, List.of(new 
RetriableException("Test")));
         createTask(initialState, transformationChainRetriableException, 
retryWithToleranceOperator);
 
@@ -1364,6 +1364,7 @@ public class WorkerSinkTaskTest {
     // Verify that when commitAsync is called but the supplied callback is not 
called by the consumer before a
     // rebalance occurs, the async callback does not reset the last committed 
offset from the rebalance.
     // See KAFKA-5731 for more information.
+    @SuppressWarnings("unchecked")
     @Test
     public void testCommitWithOutOfOrderCallback() {
         createTask(initialState);
diff --git 
a/coordinator-common/src/test/java/org/apache/kafka/coordinator/common/runtime/CoordinatorRuntimeTest.java
 
b/coordinator-common/src/test/java/org/apache/kafka/coordinator/common/runtime/CoordinatorRuntimeTest.java
index 21faf09ca2b..95872130a76 100644
--- 
a/coordinator-common/src/test/java/org/apache/kafka/coordinator/common/runtime/CoordinatorRuntimeTest.java
+++ 
b/coordinator-common/src/test/java/org/apache/kafka/coordinator/common/runtime/CoordinatorRuntimeTest.java
@@ -3444,6 +3444,7 @@ public class CoordinatorRuntimeTest {
         assertTrue(ctx.bufferSupplier.get(1).capacity() > INITIAL_BUFFER_SIZE);
     }
 
+    @SuppressWarnings("unchecked")
     @Test
     public void 
testBufferShrinkWhenCachedBufferMaxBytesReducedBelowBatchSize() {
         MockTimer timer = new MockTimer();
diff --git 
a/group-coordinator/src/test/java/org/apache/kafka/coordinator/group/streams/StreamsGroupTest.java
 
b/group-coordinator/src/test/java/org/apache/kafka/coordinator/group/streams/StreamsGroupTest.java
index 83eaa1f13b0..fa696c0a1ef 100644
--- 
a/group-coordinator/src/test/java/org/apache/kafka/coordinator/group/streams/StreamsGroupTest.java
+++ 
b/group-coordinator/src/test/java/org/apache/kafka/coordinator/group/streams/StreamsGroupTest.java
@@ -1237,6 +1237,7 @@ public class StreamsGroupTest {
         assertEquals(List.of("fallback-topic"), 
describedGroup.topology().subtopologies().get(0).sourceTopics());
     }
 
+    @SuppressWarnings("unchecked")
     @Test
     public void testCancelTimers() {
         StreamsGroup streamsGroup = createStreamsGroup("test-group");
diff --git a/server/src/test/java/org/apache/kafka/server/KRaftClusterTest.java 
b/server/src/test/java/org/apache/kafka/server/KRaftClusterTest.java
index 4513c87da68..9c1d2793fd0 100644
--- a/server/src/test/java/org/apache/kafka/server/KRaftClusterTest.java
+++ b/server/src/test/java/org/apache/kafka/server/KRaftClusterTest.java
@@ -1213,6 +1213,7 @@ public class KRaftClusterTest {
         }
     }
 
+    @SuppressWarnings("unchecked")
     @Test
     public void testCreateClusterAndRestartControllerNode() throws Exception {
         try (KafkaClusterTestKit cluster = new KafkaClusterTestKit.Builder(

Reply via email to