RFR: 2323: Use stream-bearing methods of java.nio.file.Files correctly
Erik Joelsson
erikj at openjdk.org
Wed Jul 10 11:29:51 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
Looks good.
For the gradle plugins, did you verify building the targets using them?
-------------
Marked as reviewed by erikj (Lead).
PR Review: https://git.openjdk.org/skara/pull/1675#pullrequestreview-2168717050
More information about the skara-dev
mailing list