C0urante commented on code in PR #12321:
URL: https://github.com/apache/kafka/pull/12321#discussion_r903115034


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractWorkerSourceTask.java:
##########
@@ -241,6 +242,7 @@ protected AbstractWorkerSourceTask(ConnectorTaskId id,
         this.sourceTaskMetricsGroup = new SourceTaskMetricsGroup(id, 
connectMetrics);
         this.topicTrackingEnabled = 
workerConfig.getBoolean(TOPIC_TRACKING_ENABLE_CONFIG);
         this.topicCreation = TopicCreation.newTopicCreation(workerConfig, 
topicGroups);
+        Objects.requireNonNull(this.offsetStore);

Review Comment:
   Two nits:
   1. We should probably add a message just in case something changes later and 
this ends up breaking in prod; something like "offset store cannot be null for 
source tasks" should be fine
   2. We don't even have to give this its own line; we can just tweak the line 
above from `this.offsetStore = offsetStore;` to `this.offsetStore = 
Objects.requireNonNull(offsetStore, "some message");`



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to