RFR: 7178922 : (props) re-visit how os.name is determined on Mac
naoto.sato at oracle.com
Wed Nov 14 18:30:09 UTC 2012
We do use CFLocale for the default format locale detection, which is
used for formatting Date/Time/Number etc. Users can specify different
language from it for the UI language, such as menu/button/etc, which can
(I think) only be retrieved with that JRS function.
On 11/14/12 10:21 AM, David DeHaven wrote:
> Why not just use CFLocale and call CFLocaleCopyCurrent?
>> As to the default locale detection, we need to call JavaRuntimeSupport. MacOSX's POSIX calls do not return user's preferred language/format settings.
>> On 11/14/12 1:59 AM, Alan Bateman wrote:
>>> On 13/11/2012 22:50, Brent Christian wrote:
>>>> At present, the JDK port for OS X gets its value for os.name from a
>>>> JRS function exported by the Apple Java Runtime Support framework.
>>>> Historically this has either been "Mac OS X", or "Mac OS X Server",
>>>> but there have been reports that this could change at any time, e.g.
>>>> to just "OS X". This would break any app that relies on this property
>>>> to detect the Mac platform using something like:
>>>> To ensure compatibility going forward, the os.name System property on
>>>> Mac should be hard-coded to the value that is expected, "Mac OS X".
>>>> (FWIW, as of 10.7 Mac OS X Server is no longer a separate edition of
>>>> the OS).
>>>> Webrev is here:
>>>> Note: the setUnknownOSAndVersion() function is unused following my
>>>> change, so I went ahead and removed it.
>>> This might be a question for the MacOSX folks but is it safe to continue
>>> to depend on JavaRuntimeSupport period? I'm just wondering if we really
>>> need to use it to determine the OS version and locale?
More information about the core-libs-dev