Integrated: 2323: Use stream-bearing methods of java.nio.file.Files correctly

Pavel Rappo prappo at openjdk.org
Thu Jul 11 16:05:21 UTC 2024


On Wed, 10 Jul 2024 08:47:49 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

> Streams returned from methods of `java.nio.file.Files` should be closed. A typical documentation note reads as follows:
> 
>> This method must be used within a try-with-resources statement or similar control structure to ensure that the stream's <resource> is closed promptly after the stream's operations have completed.
> 
> In a few occasions, code was additionally lightly simplified:
> 
>   - LinkTask.java#L131
>   - LinkTask.java#L179
>   - VersionPlugin.java#L55-L60

This pull request has now been integrated.

Changeset: b5f6e6dc
Author:    Pavel Rappo <prappo at openjdk.org>
Committer: Erik Joelsson <erikj at openjdk.org>
URL:       https://git.openjdk.org/skara/commit/b5f6e6dc262ab11dfb34e9c51c4a623f191b9df4
Stats:     159 lines in 20 files changed: 26 ins; 7 del; 126 mod

2323: Use stream-bearing methods of java.nio.file.Files correctly

Reviewed-by: erikj

-------------

PR: https://git.openjdk.org/skara/pull/1675


More information about the skara-dev mailing list