On Tue, 3 Mar 2026 03:53:45 GMT, Alexander Matveev <[email protected]> wrote:

>> These changes are intentional. The path to a JDK tool is always specific to 
>> the real OS.
>> 
>> In cases where TKit simulates execution on an OS that differs from the one 
>> returned by `OperatingSystem.current()`, the path to a JDK tool should still 
>> be valid on the real OS.
>
> Makes sense. Do you know if we can introduce something like 
> TKit.isRealWindows, ... or something to avoid confusion when to use what? I 
> am ok keeping this way, but I think it might be confusing why usage is 
> different for someone who does not now code well.

There is `TKit.isMockingOperatingSystem()` which returns `true` if 
`TKit.isWindows()`, `TKit.isLinux()`, and `TKit.isOSX()` return values that are 
not equal to the values returned by `OperatingSystem.isWindows()`, 
`OperatingSystem.isLinux()`, and `OperatingSystem.isMacOS()` respectively.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29908#discussion_r2875981891

Reply via email to