RFR: 8368975: Windows ProcessImpl.java has dead code

Albert Mingkun Yang ayang at openjdk.org
Thu Oct 23 10:04:04 UTC 2025


On Wed, 22 Oct 2025 23:14:11 GMT, Francesco Andreuzzi <fandreuzzi at openjdk.org> wrote:

> Removal of dead code in the windows flavor of `ProcessImpl.java`. The removed branches can't be reached because `allowAmbiguousCommands` is known to be `false` in the `else` block.
> 
> Passes tier1 in GHA.

src/java.base/windows/classes/java/lang/ProcessImpl.java line 431:

> 429:         final String allowAmbiguousCommands = System.getProperty("jdk.lang.Process.allowAmbiguousCommands", "true");
> 430: 
> 431:         if (!"false".equalsIgnoreCase(allowAmbiguousCommands)) {

I'd suggest keeping the original `boolean` var, which is more readable.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27945#discussion_r2454584394


More information about the core-libs-dev mailing list