<i18n dev> Integrated: 8280474: Garbage value passed to getLocaleInfoWrapper in HostLocaleProviderAdapter_md
Daniel Jeliński
djelinski at openjdk.java.net
Mon Jan 24 19:35:14 UTC 2022
On Fri, 21 Jan 2022 19:28:21 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:
> Reported by clang-tidy. Verified manually by running
>
> Calendar c = Calendar.getInstance();
> System.out.println (c.getDisplayNames(Calendar.MONTH, Calendar.SHORT_STANDALONE, Locale.getDefault()));
>
> with `-Djava.locale.providers=HOST`
>
> Without the fix the WINAPI functions fail, and [this block](https://github.com/openjdk/jdk/blame/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.base/windows/native/libjava/HostLocaleProviderAdapter_md.c#L857) is never entered. With the fix this block is entered and sensible values are stored in the returned array.
>
> No test because the observable effect with and without the fix was the same; apparently there's a fallback to another provider that works.
This pull request has now been integrated.
Changeset: a5416669
Author: Daniel Jeliński <djelinski at openjdk.org>
Committer: Naoto Sato <naoto at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/a5416669a57a7739af13efc32ec084560527862b
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
8280474: Garbage value passed to getLocaleInfoWrapper in HostLocaleProviderAdapter_md
Reviewed-by: naoto, alanb
-------------
PR: https://git.openjdk.java.net/jdk/pull/7184
More information about the i18n-dev
mailing list