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:41:00 UTC
[jira] [Commented] (KAFKA-13377) Fix Resocue leak due to Files.list
[ https://issues.apache.org/jira/browse/KAFKA-13377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17429373#comment-17429373 ]
Matthias J. Sax commented on KAFKA-13377:
-----------------------------------------
Thanks for reporting and fixing!
Added you to the list of contributors and assigned the ticket to you. You can now also self-assign tickets.
> 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
> Assignee: 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)