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

2016-10-31 Thread ASF GitHub Bot (JIRA)

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

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

Github user asfgit closed the pull request at:

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


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


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

2016-10-31 Thread ASF GitHub Bot (JIRA)

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

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

Github user StephanEwen commented on the issue:

https://github.com/apache/flink/pull/2665
  
Taking this over, fixing it, and merging it...


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


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

2016-10-21 Thread ASF GitHub Bot (JIRA)

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

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

Github user zentol commented on the issue:

https://github.com/apache/flink/pull/2665
  
The stream would still be unclosed in case of an exception, we should use a 
try-with-resource statement isntead.


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


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

2016-10-19 Thread ASF GitHub Bot (JIRA)

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


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

2016-10-16 Thread Ted Yu (JIRA)

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

Ted Yu commented on FLINK-4659:
---

Please go ahead.

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


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

2016-10-16 Thread Neelesh Srinivas Salian (JIRA)

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

Neelesh Srinivas Salian commented on FLINK-4659:


I can work on this one [~tedyu], if no one else is already.

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