You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2020/01/03 13:26:49 UTC

[GitHub] [incubator-dolphinscheduler] Jave-Chen opened a new issue #1701: [BUG] Fix bug: Use try-with-resources or close this "Statement" in a "finally" clause.

Jave-Chen opened a new issue #1701: [BUG] Fix bug: Use try-with-resources or close this "Statement" in a "finally" clause.
URL: https://github.com/apache/incubator-dolphinscheduler/issues/1701
 
 
   **Describe the bug**
   Resources should be closed
   
   Connections, streams, files, and other classes that implement the Closeable interface or its super-interface, AutoCloseable, needs to be closed after use. Further, that close call must be made in a finally block otherwise an exception could keep the call from being made. Preferably, when class implements AutoCloseable, resource should be created using "try-with-resources" pattern and will be closed automatically.
   
   Failure to properly close resources will result in a resource leak which could bring first the application and then perhaps the box it's on to their knees.
   
   **File**
   dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/ScriptRunner.java
   
   **SonarCloud Link**
   https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&issues=AW9Pvj4rYzPBRjkobYxo&open=AW9Pvj4rYzPBRjkobYxo
   https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&issues=AW9Pvj4rYzPBRjkobYxq&open=AW9Pvj4rYzPBRjkobYxq
   https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&issues=AW9Pvj4rYzPBRjkobYxn&open=AW9Pvj4rYzPBRjkobYxn
   https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&issues=AW9Pvj4rYzPBRjkobYxp&open=AW9Pvj4rYzPBRjkobYxp

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-dolphinscheduler] Eights-Li closed issue #1701: [BUG] Fix bug: Use try-with-resources or close this "Statement" in a "finally" clause.

Posted by GitBox <gi...@apache.org>.
Eights-Li closed issue #1701: [BUG] Fix bug: Use try-with-resources or close this "Statement" in a "finally" clause.
URL: https://github.com/apache/incubator-dolphinscheduler/issues/1701
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services