RFR: 8303485: Replacing os.name for operating system customization [v5]
Daniel Fuchs
dfuchs at openjdk.org
Thu Mar 23 15:36:36 UTC 2023
On Thu, 23 Mar 2023 13:56:52 GMT, Roger Riggs <rriggs at openjdk.org> 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:
>
> Group imports for jdk.internal.util
src/java.base/share/classes/jdk/internal/util/OperatingSystem.java line 81:
> 79: */
> 80: AIX,
> 81: ;
While browsing another PR I noticed that jlink also has an [OperatingSystem enum](https://github.com/openjdk/jdk/blob/master/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/Platform.java#L34), which has an additional `UNKNOWN` enum constant. Would it make sense to have an `UNKNOWN` constant here too, which could also make it possible to use this enum directly with jlink too?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/12931#discussion_r1146384029
More information about the build-dev
mailing list