You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "lujie (Jira)" <ji...@apache.org> on 2021/10/26 08:30:00 UTC
[jira] [Updated] (SOLR-15717) Fix resource leak due to Files.find
[ https://issues.apache.org/jira/browse/SOLR-15717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
lujie updated SOLR-15717:
-------------------------
Description:
Files.walk and Files.find will open stream and as jdk said:
* If timely disposal of file system resources is required, the
* \{@code try}-with-resources construct should be used to ensure that the
* stream's \{@link Stream#close close} method is invoked after the stream
* operations are completed.
we sould close them with try catch
patch is ready! see
https://github.com/apache/solr/pull/368
> Fix resource leak due to Files.find
> -----------------------------------
>
> Key: SOLR-15717
> URL: https://issues.apache.org/jira/browse/SOLR-15717
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: lujie
> Priority: Major
>
> Files.walk and Files.find will open stream and as jdk said:
>
> * If timely disposal of file system resources is required, the
> * \{@code try}-with-resources construct should be used to ensure that the
> * stream's \{@link Stream#close close} method is invoked after the stream
> * operations are completed.
> we sould close them with try catch
>
> patch is ready! see
>
> https://github.com/apache/solr/pull/368
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org