[
https://issues.apache.org/jira/browse/HADOOP-11229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14341912#comment-14341912
]
Tsuyoshi Ozawa commented on HADOOP-11229:
-----------------------------------------
[~skrho] Please see the oracle's page about try-with-resources:
http://docs.oracle.com/javase/7/docs/technotes/guides/language/try-with-resources.html
It can get rid of explicit close in finally block.
> JobStoryProducer is not closed upon return from
> Gridmix#setupDistCacheEmulation()
> ---------------------------------------------------------------------------------
>
> Key: HADOOP-11229
> URL: https://issues.apache.org/jira/browse/HADOOP-11229
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Ted Yu
> Assignee: skrho
> Priority: Minor
> Attachments: HADOOP-11229_001.patch, HADOOP-11229_002.patch
>
>
> Here is related code:
> {code}
> JobStoryProducer jsp = createJobStoryProducer(traceIn, conf);
> exitCode = distCacheEmulator.setupGenerateDistCacheData(jsp);
> {code}
> jsp should be closed upon return from setupDistCacheEmulation().
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)