flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Saumitra Shahapure (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (FLINK-2827) Potential resource leak in TwitterSource#loadAuthenticationProperties()
Date Mon, 19 Oct 2015 21:20:27 GMT

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

Saumitra Shahapure edited comment on FLINK-2827 at 10/19/15 9:19 PM:
---------------------------------------------------------------------

Seems to be easy fix. Can I work on it?


was (Author: ssaumitra):
Seems to be easy fix. Can I do it?

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

Mime
View raw message