flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-4659) Potential resource leak due to unclosed InputStream in SecurityContext#populateSystemSecurityProperties()
Date Wed, 19 Oct 2016 22:42:58 GMT

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

ASF GitHub Bot commented on FLINK-4659:
---------------------------------------

GitHub user nssalian opened a pull request:

    https://github.com/apache/flink/pull/2665

    [FLINK-4659]: Potential resource leak due to unclosed InputStream in SecurityContext#populateSystemSecurityProperties()

    Thanks for contributing to Apache Flink. Before you open your pull request, please take
the following check list into consideration.
    If your changes take all of the items into account, feel free to open your pull request.
For more information and/or questions please refer to the [How To Contribute guide](http://flink.apache.org/how-to-contribute.html).
    In addition to going through the list, please provide a meaningful description of your
changes.
    
    - [ ] General
      - The pull request references the related JIRA issue ([FLINK-4659]: Potential resource
leak due to unclosed InputStream in SecurityContext#populateSystemSecurityProperties())
      
    
    - [ ] Documentation
      - Documentation has been added for new functionality
      - Old documentation affected by the pull request has been updated
      - JavaDoc for public methods has been added
    
    - [ ] Tests & Build
      - Functionality added by the pull request is covered by tests
      - `mvn clean verify` has been executed successfully locally or a Travis build has passed
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nssalian/flink FLINK-4659

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/2665.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 #2665
    
----
commit 0f3d4e31f14258a775a2342c4bf534154c97d078
Author: Neelesh Srinivas Salian <nsalian@cloudera.com>
Date:   2016-10-19T00:47:20Z

    FLINK-4659: Closed the jassConfStream object to prevent resource leaks

----


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