akalash commented on a change in pull request #17187:
URL: https://github.com/apache/flink/pull/17187#discussion_r708016339



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
##########
@@ -916,11 +931,15 @@ public final void cleanUp(Throwable throwable) throws 
Exception {
         suppressedException =
                 runAndSuppressThrowable(this::releaseOutputResources, 
suppressedException);
 
-        suppressedException =
-                runAndSuppressThrowable(channelIOExecutor::shutdown, 
suppressedException);
-
-        suppressedException = runAndSuppressThrowable(mailboxProcessor::close, 
suppressedException);
+        if (channelIOExecutor != null) {
+            suppressedException =
+                    runAndSuppressThrowable(channelIOExecutor::shutdown, 
suppressedException);
+        }

Review comment:
       Yes, of course, there are more possible NPE but it is not problem since 
all of that NPE could happen only inside runAndSuppressThrowable which helps to 
handle it correctly. at least, all variables will checked




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