[ https://issues.apache.org/jira/browse/FLINK-2827?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Yu updated FLINK-2827: -------------------------- Description: 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. was: 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. > Potential resource leak in TwitterSource#loadAuthenticationProperties() > ----------------------------------------------------------------------- > > Key: FLINK-2827 > URL: https://issues.apache.org/jira/browse/FLINK-2827 > Project: Flink > Issue Type: Bug > Reporter: Ted Yu > > 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)