xccui commented on code in PR #27200:
URL: https://github.com/apache/flink/pull/27200#discussion_r2499022990
##########
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:
Yes. Actually we had used the version without the null check for several
months internally and didn't hit any issues. It implies the null check could be
redundant. However, potentially more code will use this method in the future.
So adding the check would be a defensive measure (I actually forgot to push
this commit to my previous PR). I'm fine with both.
--
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]