davidradl commented on code in PR #27200:
URL: https://github.com/apache/flink/pull/27200#discussion_r2498941329


##########
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/source/hybrid/HybridSourceReader.java:
##########
@@ -252,6 +252,8 @@ private void setCurrentReader(int index) {
     @Override
     public void pauseOrResumeSplits(
             Collection<String> splitsToPause, Collection<String> 
splitsToResume) {
-        currentReader.pauseOrResumeSplits(splitsToPause, splitsToResume);
+        if (currentReader != null) {

Review Comment:
   I had a look at the non test code, I see
   
https://github.com/apache/flink/blob/0ffacdcf7db8240fe202330e407b8c7844887e62/flink-runtime/src/main/java/org/apache/flink/streaming/api/operators/SourceOperator.java#L767
   
   
https://github.com/apache/flink/blob/0ffacdcf7db8240fe202330e407b8c7844887e62/flink-runtime/src/main/java/org/apache/flink/streaming/api/operators/SourceOperator.java#L727
   
   as the 2 callers that end up in this code - both of whom call this with a 
non null. I suggest we do not need the null check as this parameter is never 
null. Did I miss anything? 
    



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