You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Guillaume Nodet (Jira)" <ji...@apache.org> on 2022/10/20 08:11:03 UTC

[jira] [Updated] (MNG-7293) Resource Leak due to Files.walk

     [ https://issues.apache.org/jira/browse/MNG-7293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated MNG-7293:
---------------------------------
    Fix Version/s: 4.0.0-alpha-2

> Resource Leak due to Files.walk
> -------------------------------
>
>                 Key: MNG-7293
>                 URL: https://issues.apache.org/jira/browse/MNG-7293
>             Project: Maven
>          Issue Type: Improvement
>            Reporter: lujie
>            Assignee: Sylwester Lachiewicz
>            Priority: Major
>             Fix For: 4.0.0-alpha-1, 4.0.0-alpha-2, 4.0.0
>
>
> see 
> [https://github.com/apache/maven/blob/d75bea415457b2eba7815bb9c3e9cd4e14b47fce/maven-wrapper/src/main/java/org/apache/maven/wrapper/Installer.java#L143]
>  
> Stream creates by File.walk should be closed, like jdk said:
> * <p> The returned stream encapsulates one or more \{@link DirectoryStream}s.
>  * 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. Operating on a closed stream will result in an
>  * \{@link java.lang.IllegalStateException}.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)