rhauch commented on a change in pull request #10337:
URL: https://github.com/apache/kafka/pull/10337#discussion_r596333717



##########
File path: 
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Worker.java
##########
@@ -226,6 +226,7 @@ public void stop() {
 
         offsetBackingStore.stop();
         metrics.stop();
+        stopExecutor();

Review comment:
       Are there advantages of putting this simple if-check in a separate 
methods? Would it be simpler and more straightforward to just do the check here:
   ```suggestion
           if (executor != null) {
               executor.shutdownNow();
           }
   ```
   and then remove the `stopExecutor()` method?
   
   There is already precedence for an if-check a few lines above.




----------------------------------------------------------------
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.

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


Reply via email to