You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "lucklilili (via GitHub)" <gi...@apache.org> on 2023/05/24 09:22:57 UTC

[GitHub] [seatunnel] lucklilili opened a new issue, #4719: [Bug] [seatunnel-connectors-v2][connectors.seatunnel.file.sftp.system] Connector file sftp, getWorkingDirectory method exception handling unreasonable

lucklilili opened a new issue, #4719:
URL: https://github.com/apache/seatunnel/issues/4719

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
   
   
   ### What happened
   
   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.
   
       @Override
       public Path getHomeDirectory() {
           ChannelSftp channel = null;
           try {
               channel = connect();
               Path homeDir = new Path(channel.pwd());
               return homeDir;
           } catch (Exception ioe) {
               return null;
           } finally {
               try {
                   disconnect(channel);
               } catch (IOException ioe) {
                   return null;
               }
           }
       }
   
   ### SeaTunnel Version
   
   2.3.1
   
   
   ### SeaTunnel Config
   
   ```conf
   none
   ```
   
   
   ### Running Command
   
   ```shell
   none
   ```
   
   
   ### Error Exception
   
   ```log
   none
   ```
   
   
   ### Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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.apache.org

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


[GitHub] [seatunnel] lucklilili commented on issue #4719: [Bug] [seatunnel-connectors-v2][connectors.seatunnel.file.sftp.system] Connector file sftp, getWorkingDirectory method exception handling unreasonable

Posted by "lucklilili (via GitHub)" <gi...@apache.org>.
lucklilili commented on issue #4719:
URL: https://github.com/apache/seatunnel/issues/4719#issuecomment-1560758739

   issue fix done!


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


[GitHub] [seatunnel] lucklilili closed issue #4719: [Bug] [seatunnel-connectors-v2][connectors.seatunnel.file.sftp.system] Connector file sftp, getWorkingDirectory method exception handling unreasonable

Posted by "lucklilili (via GitHub)" <gi...@apache.org>.
lucklilili closed issue #4719: [Bug] [seatunnel-connectors-v2][connectors.seatunnel.file.sftp.system] Connector file sftp, getWorkingDirectory method exception handling unreasonable
URL: https://github.com/apache/seatunnel/issues/4719


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