summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorNikita Iashchenko <nikitai@google.com>2018-12-17 17:37:25 +0000
committerNikita Iashchenko <nikitai@google.com>2018-12-18 15:50:24 +0000
commita19714bcc795fa2833043f215ad8245e2187e153 (patch)
tree41cb3abd56c8c6e9c1764926181b0537d672b9b3 /annotations/generate_annotated_java_files.py
parentdffb7550cce5870a455697eeb6ee55781127afba (diff)
Verify SimpleDateFormat.java against 8u121-b13 (part 3)
This CL fixes incorrect behavior after past refactoring: when the switch cases in subFormat() that handle 'L' and 'M' format strings were extracted to formatMonth() helper method, the behavior difference was introduced. It happens when no dateFormatSymbols are used AND there are more than three modifiers in format string. It leads to not adding standalone flag to style variable when requesting calendar data for month display name. So previously if January in Russian locale was formatted using "LLLLL" (standalone form), the expected result would be "Январь" (nominative case), but the actual result would be "Января" ("context-sensitive" genitive case) -- notice the difference in the last letter. The fix is straightforward: add missing else-clause that handles cases when more than three modifiers are given as input and adds standalone flag to style before requesting month display name. Added corresponding test cases in Russian and Czech locale (they both have different results in context-(in)sensitive forms). This CL finishes verification of SimpleDateFormat.java. Bug: 66411240 Test: cts-tradefed run cts -m CtsLibcoreTestCases --abi arm64-v8a Change-Id: I58298b293ec5dc63e300561ebdc4cb27812b7076
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions