From 67b6426660d675cb9c72ce3001d7c004333463e7 Mon Sep 17 00:00:00 2001 From: xijiu <422766572@qq.com> Date: Fri, 27 Dec 2024 12:31:23 +0800 Subject: [PATCH] KAFKA-18348 Remove the deprecated MockConsumer#setException (#18317) Reviewers: TengYao Chi , TaiJuWu , Chia-Ping Tsai --- .../org/apache/kafka/clients/consumer/MockConsumer.java | 8 -------- docs/upgrade.html | 4 ++++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/clients/src/main/java/org/apache/kafka/clients/consumer/MockConsumer.java b/clients/src/main/java/org/apache/kafka/clients/consumer/MockConsumer.java index 817e8a63b201..9ee66e4f320c 100644 --- a/clients/src/main/java/org/apache/kafka/clients/consumer/MockConsumer.java +++ b/clients/src/main/java/org/apache/kafka/clients/consumer/MockConsumer.java @@ -314,14 +314,6 @@ public synchronized void addRecord(ConsumerRecord record) { recs.add(record); } - /** - * @deprecated Use {@link #setPollException(KafkaException)} instead - */ - @Deprecated - public synchronized void setException(KafkaException exception) { - setPollException(exception); - } - public synchronized void setPollException(KafkaException exception) { this.pollException = exception; } diff --git a/docs/upgrade.html b/docs/upgrade.html index 56b2ebda4e2f..484202297d3e 100644 --- a/docs/upgrade.html +++ b/docs/upgrade.html @@ -188,6 +188,10 @@
Notable changes in 4
  • The committed(TopicPartition) and committed(TopicPartition, Duration) methods were removed from the consumer. Please use committed(Set<TopicPartition>) and committed(Set<TopicPartition>, Duration) instead.
  • +
  • + The setException(KafkaException) method was removed from the org.apache.kafka.clients.consumer.MockConsumer. + Please use setPollException(KafkaException) instead. +
  • Producer