asdf2014 opened a new pull request, #22821:
URL: https://github.com/apache/kafka/pull/22821

   The `ConsumerRecords(Map)` constructor was deprecated in 4.0 by KIP-1094 
with `forRemoval = true` and is scheduled for removal in 5.0 (KAFKA-20660).
   
   Remove the constructor together with the taint-tracking machinery that 
existed only to warn when it was used: the `tainted` flag, the rate-limited 
error log in `nextOffsets()`, the `TAINT_LOG_INTERVAL_NS` and 
`TAINTED_NEXT_OFFSETS_LAST_LOG_NS` statics, and the now-unused logger and 
imports. The private three-argument constructor is folded into the public 
two-argument one.
   
   Update `ConsumerRecordsTest` accordingly: drop the test that exercised the 
deprecated constructor's logging behavior, and simplify the two remaining 
`nextOffsets()` tests that only asserted the absence of that logging (also 
removing the now-unused `LogCaptureAppender` and `assertFalse` imports).
   
   Testing: no remaining usages of the removed constructor or javadoc 
references to it across the code base (checked Java and Scala sources). 
Verified locally on both JDK 17 and JDK 25 with the `ConsumerRecordsTest` unit 
tests and checkstyle, plus spotbugs; the constructor that remains is covered by 
the existing tests.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to