RFR: 2323: Use stream-bearing methods of java.nio.file.Files correctly
duke
duke at openjdk.org
Thu Jul 11 15:56:20 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
@pavelrappo
Your change (at version e11ccf49d7308f32e9c7b5f5201de9f4f6504eb7) is now ready to be sponsored by a Committer.
-------------
PR Comment: https://git.openjdk.org/skara/pull/1675#issuecomment-2223305061
More information about the skara-dev
mailing list