flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLINK-2649) Potential resource leak in JarHelper#unjar()
Date Wed, 09 Sep 2015 21:30:46 GMT
Ted Yu created FLINK-2649:
-----------------------------

             Summary: 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)

Mime
View raw message