Skip to content

Commit

Permalink
KAFKA-18348 Remove the deprecated MockConsumer#setException (#18317)
Browse files Browse the repository at this point in the history
Reviewers: TengYao Chi <[email protected]>, TaiJuWu <[email protected]>, Chia-Ping Tsai <[email protected]>
  • Loading branch information
xijiu authored Dec 27, 2024
1 parent 2e3b4cb commit 6139840
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,14 +314,6 @@ public synchronized void addRecord(ConsumerRecord<K, V> 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;
}
Expand Down
4 changes: 4 additions & 0 deletions docs/upgrade.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ <h5><a id="upgrade_400_notable" href="#upgrade_400_notable">Notable changes in 4
<li>The <code>committed(TopicPartition)</code> and <code>committed(TopicPartition, Duration)</code> methods were removed from the consumer.
Please use <code>committed(Set&ltTopicPartition&gt)</code> and <code>committed(Set&ltTopicPartition&gt, Duration)</code> instead.
</li>
<li>
The <code>setException(KafkaException)</code> method was removed from the <code>org.apache.kafka.clients.consumer.MockConsumer</code>.
Please use <code>setPollException(KafkaException)</code> instead.
</li>
</ul>
</li>
<li><b>Producer</b>
Expand Down

0 comments on commit 6139840

Please sign in to comment.