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.

The copyright years on these files will need an update.

src/java.base/share/classes/java/lang/ProcessBuilder.java line 545:

> 543:          * {@snippet lang = "java" :
> 544:          *     Redirect.DISCARD.file() // is the filename appropriate 
> for the operating system
> 545:          *     Redirect.DISCARD.type() == Redirect.Type.WRITE

With this use of snippet here I think it no longer conveys what the original 
`{@code}` block was trying to convey. I can't currently think of a better 
proposal either.

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

PR Comment: https://git.openjdk.org/jdk/pull/25884#issuecomment-3013634413
PR Review Comment: https://git.openjdk.org/jdk/pull/25884#discussion_r2172385878

Reply via email to