[
https://issues.apache.org/jira/browse/FLINK-2322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14635667#comment-14635667
]
ASF GitHub Bot commented on FLINK-2322:
---------------------------------------
Github user StephanEwen commented on the pull request:
https://github.com/apache/flink/pull/928#issuecomment-123453516
You should use tabs ;-)
Otherwise this is a good fix. To optimize it: You need not close the stream
in two places, the finally clause will do it anyways.
> Unclosed stream may leak resource
> ---------------------------------
>
> Key: FLINK-2322
> URL: https://issues.apache.org/jira/browse/FLINK-2322
> Project: Flink
> Issue Type: Bug
> Reporter: Ted Yu
> Labels: starter
>
> In UdfAnalyzerUtils.java :
> {code}
> ClassReader cr = new
> ClassReader(Thread.currentThread().getContextClassLoader()
> .getResourceAsStream(internalClassName.replace('.', '/') +
> ".class"));
> {code}
> The stream returned by getResourceAsStream() should be closed upon exit of
> findMethodNode()
> In ParameterTool#fromPropertiesFile():
> {code}
> props.load(new FileInputStream(propertiesFile));
> {code}
> The FileInputStream should be closed before returning.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)