You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/09/20 18:49:04 UTC

[jira] [Commented] (FLINK-2649) Potential resource leak in JarHelper#unjar()

    [ https://issues.apache.org/jira/browse/FLINK-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14899997#comment-14899997 ] 

ASF GitHub Bot commented on FLINK-2649:
---------------------------------------

GitHub user tedyu opened a pull request:

    https://github.com/apache/flink/pull/1151

    FLINK-2649 Potential resource leak in JarHelper#unjar()

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tedyu/flink master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/1151.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 #1151
    
----
commit 9350a913db2f08068303d63ed31e3f7da76151d6
Author: Ted <yu...@gmail.com>
Date:   2015-09-20T16:47:43Z

    FLINK-2649 Potential resource leak in JarHelper#unjar()

----


> Potential resource leak in JarHelper#unjar()
> --------------------------------------------
>
>                 Key: FLINK-2649
>                 URL: https://issues.apache.org/jira/browse/FLINK-2649
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Ted Yu
>
> {code}
>     dest = new BufferedOutputStream(fos, BUFFER_SIZE);
>     while ((count = jis.read(data, 0, BUFFER_SIZE)) != -1) {
>     dest.write(data, 0, count);
>     }
>     dest.flush();
>     dest.close();
> {code}
> The close() of dest should be enclosed in finally block.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)