You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/10/11 13:35:45 UTC

[GitHub] [incubator-seatunnel] DarkAssassinator commented on a diff in pull request #3053: [Improve] close resources in finally block

DarkAssassinator commented on code in PR #3053:
URL: https://github.com/apache/incubator-seatunnel/pull/3053#discussion_r992336446


##########
seatunnel-core/seatunnel-core-flink/src/main/java/org/apache/seatunnel/core/flink/command/FlinkApiTaskExecuteCommand.java:
##########
@@ -80,9 +80,10 @@ public void execute() throws CommandExecuteException {
                 FlinkEnvironment> execution = new ExecutionFactory<>(executionContext).createExecution()) {
             prepare(executionContext.getEnvironment(), sources, transforms, sinks);
             execution.start(sources, transforms, sinks);
-            close(sources, transforms, sinks);
         } catch (Exception e) {
             throw new CommandExecuteException("Execute Flink task error", e);
+        } finally {
+            close(sources, transforms, sinks);

Review Comment:
   add `showAsciiLogo` into this try block? but as i know, this `showAsciiLogo` will not throw exception.



-- 
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: commits-unsubscribe@seatunnel.apache.org

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