You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "lujie (Jira)" <ji...@apache.org> on 2021/10/14 10:08:00 UTC
[jira] [Updated] (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 ]
lujie updated KAFKA-13377:
--------------------------
Summary: Fix Resocue leak due to Files.list (was: Fix )
> 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
>
> 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)