RFR: 8368192: Test java/lang/ProcessBuilder/Basic.java#id0 fails with Exception: Stack trace [v2]

Jaikiran Pai jpai at openjdk.org
Tue Sep 23 08:08:06 UTC 2025


On Mon, 22 Sep 2025 19:07:43 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> 8368192: Test java/lang/ProcessBuilder/Basic.java#id0 fails with Exception: Stack trace
>> With MacOsX Sequoia 15.7 the command environment contains a new TMPDIR variable.
>> The ProcessBuild/Basic test checks for a small set of variables set in the parent
>> and ignores variables that are set by the OS or runtime, now including TMPDIR.
>> 
>> In the Basic test, for MacOSX, checks of the environment in the child should ignore TMPDIR in addition
>> to the other existing environment variables that are expected.
>
> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Remove test from problem list

Overall this looks fine to me.

test/jdk/java/lang/ProcessBuilder/Basic.java line 783:

> 781:         Matcher matcher = Pattern.compile(regex).matcher(str);
> 782:         if (matcher.find()) {
> 783:             return matcher.replaceAll(replacement);

Nit - the call to `replaceAll()` doesn't have to be guarded by the `matcher.find()`. The if/else could be replaced with `return matcher.replaceAll(replacement);` - in the absence of a match, this would return the `str`.

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

Marked as reviewed by jpai (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/27434#pullrequestreview-3256757603
PR Review Comment: https://git.openjdk.org/jdk/pull/27434#discussion_r2371505721


More information about the core-libs-dev mailing list