bade80a7a23ee1e579d7272b3ffb74e6fe2374d7 |
|
05-Dec-2016 |
Tobias Thierer <tobiast@google.com> |
Fix LocaleMatcher modifying global static map during query Also fix some occurences of string.replaceAll() that were passing literal strings, or regular expressions that could have been expressed as literal strings, by replacing them with the appropriate string.replace() calls. This backports the fix for bug https://bugs.openjdk.java.net/browse/JDK-8166994 That fix was based on a patch that was previously upstreamed. Test: LocaleLanguageRangeTest Test: LocaleTest Bug: 29935305 Change-Id: I6b0c4fbb977bdaee714b5b0aa26d3900ce4f8e85
|
af33b46fdcb47760c0aa443182d70031609c5522 |
|
22-Sep-2016 |
Tobias Thierer <tobiast@google.com> |
Update Locale to OpenJDK8u60, part 2 This CL adds APIs for RFC 4647 Matching of Language Tags. Assertions in added tests are a combination of current behavior and examples from RFC 4647. Notes: * The upstream code has a bug where calling LocaleMatcher.parse() modifies values of static final LocaleEquivalentMaps.multiEquivsMap. This bug has already been reported upstream at https://bugs.openjdk.java.net/browse/JDK-8166994 The upstream fix will be applied along with suitable tests in a follow-up CL. * Locale.filterTag() and Locale.lookupTag*() tends to return lowerCase versions of the tags supplied, except when the priority list of LanguageRanges contains a "*" or similar. For now, LocaleTest lowerCases all tags (via tagsOf()) so that the test can pass. I plan to submit a patch / proposal to upstream to preserve case of the given tags, at which point the test could be made more opinionated. * The hard coded mapping of equivalent locales in LocaleEquivalentMaps comes from an unknown source. It doesn't appear to be present in ICU so this CL is taking the upstream mapping for now. * Notwithstanding the comments above, the code added to Locale.java, LocaleEquivalentMaps.java and LocaleMatcher.java in this CL exactly matches upstream OpenJDK8u60. No attempt has been made to make this code cleaner / more robust in this CL. Bug: 29935305 Test: cts-tradefed run cts -m CtsLibcoreTestCases -a arm64-v8a Change-Id: Ie86477b8eea1f5f3d69d4f161628847793d372fd
|