This is an automated email from the ASF dual-hosted git repository. rhauch pushed a commit to branch 2.6 in repository https://gitbox.apache.org/repos/asf/kafka.git
commit 2eeac88c578a7a053369a5e751824bb6729b6f58 Author: Randall Hauch <[email protected]> AuthorDate: Fri Jun 5 15:20:24 2020 -0500 KAFKA-10111: Make SinkTaskContext.errantRecordReporter() a default method (#8814) Connector projects may have their own mock or testing implementations of the `SinkTaskContext`, and this newly-added method should be a default method to prevent breaking those projects. Changing this to a default method that returns null also makes sense w/r/t the method semantics, since the method is already defined to return null if the reporter has not been configured. Author: Randall Hauch <[email protected]> Reviewer: Konstantine Karantasis <[email protected]> --- .../src/main/java/org/apache/kafka/connect/sink/SinkTaskContext.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/connect/api/src/main/java/org/apache/kafka/connect/sink/SinkTaskContext.java b/connect/api/src/main/java/org/apache/kafka/connect/sink/SinkTaskContext.java index a431dbe..33c82cb 100644 --- a/connect/api/src/main/java/org/apache/kafka/connect/sink/SinkTaskContext.java +++ b/connect/api/src/main/java/org/apache/kafka/connect/sink/SinkTaskContext.java @@ -119,6 +119,8 @@ public interface SinkTaskContext { * @return the reporter; null if no error reporter has been configured for the connector * @since 2.6 */ - ErrantRecordReporter errantRecordReporter(); + default ErrantRecordReporter errantRecordReporter() { + return null; + } }
