RFR: 8303485: Replacing os.name for operating system customization

Roger Riggs rriggs at openjdk.org
Thu Mar 9 16:17:34 UTC 2023


On Thu, 9 Mar 2023 00:45:02 GMT, Naoto Sato <naoto 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.
>
> src/java.base/unix/classes/java/lang/ProcessImpl.java line 106:
> 
>> 104:         try {
>> 105:             // Should be value of a LaunchMechanism enum
>> 106:             LaunchMechanism lm = LaunchMechanism.valueOf(s.toUpperCase(Locale.ENGLISH));
> 
> I think `Locale.ROOT` is preferred here.

ok, but not strictly in scope for this PR; that's pre-existing code.

-------------

PR: https://git.openjdk.org/jdk/pull/12931



More information about the build-dev mailing list