RFR: 8303485: Replacing os.name for operating system customization
Justin King
jcking at google.com
Thu Mar 9 04:02:52 UTC 2023
Let's please not kill generic BSD support if at all possible. There is
NetBSD, OpenBSD, FreeBSD, and DragonflyBSD. I know FreeBSD and NetBSD have
OpenJDK 19 and 17 respectively.
On Wed, Mar 8, 2023, 6:54 PM David Holmes <dholmes at openjdk.org> wrote:
> On Wed, 8 Mar 2023 19:15:16 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.
>
> I guess I'm surprised this hasn't been done long before now. :)
>
> Just a couple of drive by comments (I agree with comments made by others).
>
> Has this totally killed of BSD support on the JDK side? I thought building
> non-macOS BSD was still viable, but perhaps not - certainly not after this
> change.
>
> Thanks
>
> src/java.base/share/classes/jdk/internal/misc/OperatingSystem.java line 48:
>
> > 46: * For example,
> > 47: * {@snippet lang = "java":
> > 48: * if (OperatingSystem.current() == Windows) {
>
> Doesn't `Windows` need to be prefixed with `OperatingSystem` here? Ditto
> for dispatch example following.
>
> src/java.base/share/classes/jdk/internal/misc/OperatingSystem.java line
> 105:
>
> > 103: */
> > 104: @ForceInline
> > 105: public static boolean isMac() {
>
> suggestion: isMacOS
>
> -------------
>
> PR: https://git.openjdk.org/jdk/pull/12931
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20230308/980d7009/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3999 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20230308/980d7009/smime.p7s>
More information about the build-dev
mailing list