flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephan Ewen (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (FLINK-4659) Potential resource leak due to unclosed InputStream in SecurityContext#populateSystemSecurityProperties()
Date Mon, 31 Oct 2016 18:22:58 GMT

     [ https://issues.apache.org/jira/browse/FLINK-4659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Stephan Ewen closed FLINK-4659.
-------------------------------

> Potential resource leak due to unclosed InputStream in SecurityContext#populateSystemSecurityProperties()
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-4659
>                 URL: https://issues.apache.org/jira/browse/FLINK-4659
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: Neelesh Srinivas Salian
>            Priority: Minor
>             Fix For: 1.2.0
>
>
> {code}
>                 try {
>                         Path jaasConfPath = Files.createTempFile(JAAS_CONF_FILENAME,
"");
>                         InputStream jaasConfStream = SecurityContext.class.getClassLoader().getResourceAsStream(JAAS_CONF_FILENAME);
>                         Files.copy(jaasConfStream, jaasConfPath, StandardCopyOption.REPLACE_EXISTING);
>                         jaasConfFile = jaasConfPath.toFile();
>                         jaasConfFile.deleteOnExit();
>                 } catch (IOException e) {
>                         throw new RuntimeException("SASL auth is enabled for ZK but unable
to " +
> {code}
> jaasConfStream should be closed in finally block.



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

Mime
View raw message