[
https://issues.apache.org/jira/browse/HDFS-16037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18041582#comment-18041582
]
ASF GitHub Bot commented on HDFS-16037:
---------------------------------------
github-actions[bot] closed pull request #3046: HDFS-16037. Possible Resource
Leak in org.apache.hadoop.hdfs.tools.offlineImageViewer#FSImageLoader
URL: https://github.com/apache/hadoop/pull/3046
> Possible Resource Leak in
> org.apache.hadoop.hdfs.tools.offlineImageViewer#FSImageLoader
> ---------------------------------------------------------------------------------------
>
> Key: HDFS-16037
> URL: https://issues.apache.org/jira/browse/HDFS-16037
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Narges Shadab
> Priority: Major
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> We notice a possible resource leak in line
> [113|https://github.com/apache/hadoop/blob/59172ada9014f8c056f2bd37b25a26572ca643af/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/FSImageLoader.java#L113].
> {{file}} remains open if line 115 or 118 throws an IOException. We should
> define {{fin}} and {{file}} in try-with-resources.
> I've submitted a pull request to fix it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]