Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Fix] [seatunnel-connectors-v2][SFTP] Fix incorrect exception handling logic #4720

Merged
merged 9 commits into from
May 12, 2023

Conversation

lucklilili
Copy link
Contributor

@lucklilili lucklilili commented May 8, 2023

Return cannot be used in a finally block. When a return in a finally block is returned, the method ends execution and the return statement in a try block will no longer be executed.

@#4719 (comment)

Purpose of this pull request

Fix Return cannot be used in a finally block. When a return in a finally block is returned, the method ends execution and the return statement in a try block will no longer be executed.

Check list

lucklilili and others added 2 commits May 8, 2023 15:56
…block is returned, the method ends execution and the return statement in a try block will no longer be executed.
Return cannot be used in a finally block. When a return in a finally block is returned, the method ends execution and the return statement in a try block will no longer be executed.
@lucklilili lucklilili changed the title Update SFTPFileSystem.java [Bug] [seatunnel-connectors-v2][connectors.seatunnel.file.sftp.system] Connector file sftp, Fix code logic, robust system May 8, 2023
@lucklilili lucklilili changed the title [Bug] [seatunnel-connectors-v2][connectors.seatunnel.file.sftp.system] Connector file sftp, Fix code logic, robust system [Bug] [seatunnel-connectors-v2][connectors.seatunnel.file.sftp.system] Fix incorrect exception handling logic May 8, 2023
@lucklilili lucklilili changed the title [Bug] [seatunnel-connectors-v2][connectors.seatunnel.file.sftp.system] Fix incorrect exception handling logic [Bug Fix] [seatunnel-connectors-v2][connectors.seatunnel.file.sftp.system] Fix incorrect exception handling logic May 8, 2023
Hisoka-X
Hisoka-X previously approved these changes May 8, 2023
Copy link
Member

@Hisoka-X Hisoka-X left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! LGTM

@zhilinli123
Copy link
Contributor

zhilinli123 commented May 8, 2023

Please check your CI @lucklilili
https://github.com/apache/incubator-seatunnel/actions/runs/4913075392/jobs/8777251678?pr=4720
You should do mvn spotless:apply To ensure that the code style is uniform

lucklilili added 2 commits May 9, 2023 09:16
# Conflicts:
#	seatunnel-connectors-v2/connector-file/connector-file-sftp/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sftp/system/SFTPFileSystem.java
…block is returned, the method ends execution and the return statement in a try block will no longer be executed. V2, Run 'mvn spocles: apply' to fix these conflicts.
@lucklilili
Copy link
Contributor Author

@zhilinli123 The mvn spotless: apply check CI has been executed and a new pull request has been submitted

EricJoy2048
EricJoy2048 previously approved these changes May 10, 2023
Copy link
Member

@EricJoy2048 EricJoy2048 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Please wait CI

@EricJoy2048 EricJoy2048 changed the title [Bug Fix] [seatunnel-connectors-v2][connectors.seatunnel.file.sftp.system] Fix incorrect exception handling logic [Bug Fix] [seatunnel-connectors-v2][SFTP] Fix incorrect exception handling logic May 12, 2023
@Hisoka-X Hisoka-X merged commit dc350e6 into apache:dev May 12, 2023
@Hisoka-X
Copy link
Member

@lucklilili Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants