RFR: JDK-8307807 Replace use of System.getProperty("os.name") with PlatformUtil calls [v6]

Andy Goryachev angorya at openjdk.org
Fri May 12 15:17:50 UTC 2023


On Fri, 12 May 2023 15:00:55 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> I'd still prefer to use PlatformUtil, since this is a cleaner solution that the variety of methods used before:
>> 
>> osNameLowerCase.startsWith("wind"
>> "ios".equals(System.getProperty("os.name")
>> osName.startsWith("Windows"
>> osName.startsWith("Mac OS"
>> ("os.name").toLowerCase().indexOf("win")
>
> I initially had the same thought. What this actually highlights, though, is the danger of having this sort of check scattered in multiple places, but done differently. If it was important that "darwin" be recognized (it isn't), then it would be wrong to have this check recognize it, but all other "isMac" checks not recognize it.

Do we officially support Darwin OS?

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1132#discussion_r1192504164


More information about the openjfx-dev mailing list