RFR: 7903988: IDEA plugin: temp directories don't work on Windows [v2]
Jorn Vernee
jvernee at openjdk.org
Wed Apr 16 13:29:56 UTC 2025
On Mon, 14 Apr 2025 18:00:06 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> plugins/idea/src/main/java/com/oracle/plugin/jtreg/configuration/JTRegConfigurationRunnableState.java line 111:
>>
>>> 109: javaParameters.setMainClass("com.sun.javatest.regtest.Main");
>>> 110:
>>> 111: if (JTRegUtils.IS_WINDOWS) {
>>
>> What happens if `System.getenv("TMP")` returns `null`?
>>
>> Wouldn't it be better to check that first for each pair, and if the value is non-null, add the pair to the `javaParameters` instance?
>
> That's probably better yeah. I was assuming the value would just be ignored if null. The implementation of `addEnv` just adds the value to a map.
I've changed it to only conditionally forward variables that are not null.
-------------
PR Review Comment: https://git.openjdk.org/jtreg/pull/258#discussion_r2046936273
More information about the jtreg-dev
mailing list