You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Matthias J. Sax (Jira)" <ji...@apache.org> on 2021/10/15 16:39:00 UTC
[jira] [Resolved] (KAFKA-13377) Fix Resocue leak due to Files.list
[ https://issues.apache.org/jira/browse/KAFKA-13377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matthias J. Sax resolved KAFKA-13377.
-------------------------------------
Fix Version/s: 3.1.0
Resolution: Fixed
> Fix Resocue leak due to Files.list
> -----------------------------------
>
> Key: KAFKA-13377
> URL: https://issues.apache.org/jira/browse/KAFKA-13377
> Project: Kafka
> Issue Type: Improvement
> Reporter: lujie
> Priority: Major
> Fix For: 3.1.0
>
>
> Files.list will open dir stream, we should close it.
>
> see jdk: the
> \{try} -with-resources construct should be used to ensure that the
> stream's
> {[@link|https://github.com/link] Stream#close close}
> method is invoked after the stream
> operations are completed.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)