On Tue, 14 Mar 2023 14:14:30 GMT, Roger Riggs <[email protected]> wrote:
>> Improvements to support OS specific customization for JDK internal use:
>> - To select values and code; allowing elimination of unused code and values
>> - Optionally evaluated by build processes, compilation, or archiving (i.e.
>> CDS)
>> - Simple API to replace adhoc comparisons with `os.name`
>> - Clear and consistent use across build, runtime, and JDK modules
>>
>> The PR includes updates within java.base to use the new API.
>
> Roger Riggs has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Fix indentation and improve exception message
src/java.base/share/classes/jdk/internal/util/OperatingSystem.java line 29:
> 27:
> 28: /**
> 29: * Enumeration of operating system types and testing for the current OS.
Would it be more correct to say an enumerating of operating system names rather
than types?
src/java.base/unix/classes/java/lang/ProcessImpl.java line 405:
> 403:
> 404: case Windows: throw new AssertionError("Unsupported
> platform: " +
> 405: OperatingSystem.current());
This is switch on a enum so if a new port is added then this will just fall
through silently, whereas I think you want it to fail.
-------------
PR: https://git.openjdk.org/jdk/pull/12931