On Wed, 8 Mar 2023 19:15:16 GMT, Roger Riggs <rri...@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