[ https://issues.apache.org/jira/browse/FLINK-2827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14965428#comment-14965428 ]
ASF GitHub Bot commented on FLINK-2827: --------------------------------------- GitHub user ssaumitra opened a pull request: https://github.com/apache/flink/pull/1276 [FLINK-2827] Closing FileInputStream in finally block to avoid unused open stream. You can merge this pull request into a Git repository by running: $ git pull https://github.com/ssaumitra/flink FLINK-2254 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/1276.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 #1276 ---- commit 4a16423d24f73533674b555e9fdf26b2b0423182 Author: Saumitra Shahapure <saumitra.offic...@gmail.com> Date: 2015-10-20T17:28:31Z [FLINK-2827] Closing FileInputStream in finally block to avoid unused open stream. ---- > Potential resource leak in TwitterSource#loadAuthenticationProperties() > ----------------------------------------------------------------------- > > Key: FLINK-2827 > URL: https://issues.apache.org/jira/browse/FLINK-2827 > Project: Flink > Issue Type: Bug > Affects Versions: 0.10 > Reporter: Ted Yu > Assignee: Saumitra Shahapure > Priority: Minor > Labels: starter > > Here is related code: > {code} > Properties properties = new Properties(); > try { > InputStream input = new FileInputStream(authPath); > properties.load(input); > input.close(); > } catch (Exception e) { > throw new RuntimeException("Cannot open .properties > file: " + authPath, e); > } > {code} > If there is exception coming out of properties.load() call, input would be > left open. -- This message was sent by Atlassian JIRA (v6.3.4#6332)