RFR: 8303485: Replacing os.name for operating system customization [v5]
Roger Riggs
rriggs at openjdk.org
Thu Mar 23 15:55:22 UTC 2023
On Thu, 23 Mar 2023 15:33:59 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> 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?
Its not needed here. In the jlink version, that value is only used if the mapping from os.name fails.
With the new OperatingSystem enum, it is exactly one of the os's supported by the build. If there is no build support then it never gets to a runtime error.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/12931#discussion_r1146408856
More information about the build-dev
mailing list