[ https://issues.apache.org/jira/browse/MNG-5844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14593252#comment-14593252 ]
ASF GitHub Bot commented on MNG-5844: ------------------------------------- GitHub user sugartxy opened a pull request: https://github.com/apache/maven/pull/53 #MNG-5844: Close IO Streams in finally block Place the close method in the finally clause, so we can ensure it always runs regardless of how the method exits. You can merge this pull request into a Git repository by running: $ git pull https://github.com/sugartxy/maven Close-In-Finally Alternatively you can review and apply these changes as the patch at: https://github.com/apache/maven/pull/53.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #53 ---- commit f7de4ed38169d775f685d1b3756a69db34b51a0a Author: sugartxy <tgt...@163.com> Date: 2015-06-19T09:10:43Z #MNG-5844: Close IO Streams in finally block Place the close method in the finally clause, so we can ensure it always runs regardless of how the method exits. ---- > Close IO Streams in finally block > --------------------------------- > > Key: MNG-5844 > URL: https://issues.apache.org/jira/browse/MNG-5844 > Project: Maven > Issue Type: Improvement > Reporter: Tang Xinye > Priority: Critical > > The problem here is that if an exception is thrown during the read process > the method will exit without closing the stream and hence without releasing > the file system resources, it may run out of resources before it does run. -- This message was sent by Atlassian JIRA (v6.3.4#6332)