On Wed, 18 Jun 2025 20:16:18 GMT, Roger Riggs <rri...@openjdk.org> wrote:

> Improve the documentation of Process use of system resources.
> 
> Describe the implementation closing streams when no longer referenced.
> Clarify the interactions between inputStream and inputReader and errorStream 
> and errorReader.
> Add advice and example using try-with-resources to open and close streams.
> Recommend closing streams when no longer in use.

src/java.base/share/classes/java/lang/Process.java line 233:

> 231:      *
> 232:      * @apiNote
> 233:      * Avoid using both {@link #getErrorStream} and {@link 
> #inputReader(Charset)}.

There's a typo here - the second link should have been `{@link #errorReader()}`

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25884#discussion_r2172362719

Reply via email to