21389a1f950454174dc5d057bbc0247e11a175e0 |
|
31-Jul-2014 |
Neil Fuller <nfuller@google.com> |
Make some DateFormatSymbols fields private locale and zoneStrings are not accessed outside of DateFormatSymbols. Bug: 16502916 (cherry picked from commit f042be4f160f526c14fa68fdce578f2a0dbf222e) Change-Id: I13b957c105fcff807f23e4081a1b514d4627fd40
|
07349e9d1011192699a08e7a0553b3e0e88da103 |
|
29-Jul-2014 |
Neil Fuller <nfuller@google.com> |
Change the DateFormatSymbols serialized form Adding locale to the serialized form of DateFormatSymbols. Some duplicated code around the generation of numeric / offset timezone strings (e.g. GMT+08:00) has been removed. A new hidden method has been added to TimeZone to create this string. The timezone string lookup has been moved into LocaleData and it now has a single path rather than treating the customZoneStrings path as special. customZoneStrings has been removed from DateFormatSymbols because it would potentially have an incorrect value after serialization and it is no longer required. (cherry picked from commit f39e1d71b478bafac028043a59683dfbed1d9df0) Bug: 16502916 Change-Id: Id5b18728dc5cd0656d77d67eb509beedcc52f893
|
f042be4f160f526c14fa68fdce578f2a0dbf222e |
|
31-Jul-2014 |
Neil Fuller <nfuller@google.com> |
Make some DateFormatSymbols fields private locale and zoneStrings are not accessed outside of DateFormatSymbols. Bug: 16502916 Change-Id: I67907cf6b0ebc2e6a2dd0bfe8728ba6d0487d5a3
|
f39e1d71b478bafac028043a59683dfbed1d9df0 |
|
29-Jul-2014 |
Neil Fuller <nfuller@google.com> |
Change the DateFormatSymbols serialized form Adding locale to the serialized form of DateFormatSymbols. Some duplicated code around the generation of numeric / offset timezone strings (e.g. GMT+08:00) has been removed. A new hidden method has been added to TimeZone to create this string. The timezone string lookup has been moved into LocaleData and it now has a single path rather than treating the customZoneStrings path as special. customZoneStrings has been removed from DateFormatSymbols because it would potentially have an incorrect value after serialization and it is no longer required. Bug: 16502916 Change-Id: I2b317e34ba4772beb372a75dd08c95113408b9cc
|
df624c1cc36dc17e4051d1100a3400aeb4252511 |
|
25-Jun-2014 |
Narayan Kamath <narayan@google.com> |
Fix handling of invalid locales in Date/DecimalFormatSymbols. For locales whose language code is "und" we use Locale.ROOT instead. This also fixes two other corner cases : - We were using the wrong locale to fetch timezone strings when the input locale was null. we now use the same locale throughout by making sure we don't perform any subsititutions in LocaleData.get. - Adds a clearer comment about the broken serialization behaviour. bug: 15849709 (cherry picked from commit 043a1424a4e3bbb5abc9d9e11c9c088b20f4ca7d) Change-Id: I716fb421fb8643dedebb3a7797a76ed1dd86c548
|
5c0472fd7c53464e526bb833707551d85dbafec1 |
|
25-Jun-2014 |
Narayan Kamath <narayan@google.com> |
Fix handling of invalid locales in Date/DecimalFormatSymbols. For locales whose language code is "und" we use Locale.ROOT instead. This also fixes two other corner cases : - We were using the wrong locale to fetch timezone strings when the input locale was null. we now use the same locale throughout by making sure we don't perform any subsititutions in LocaleData.get. - Adds a clearer comment about the broken serialization behaviour. bug: 15849709 Change-Id: I95e7eb0ccb7458711038ce9b1c76b3279acda9d6
|
74473971cc9d960376295fbcc430320c9ed62991 |
|
29-Aug-2013 |
Elliott Hughes <enh@google.com> |
Fix harmony java.text test failures. There were plenty of bad tests here, but there were some real bugs too. * DecimalFormat was only handling RoundingMode.UNNECESSARY for double formatting. * DecimalFormat was not ensuring that it's superclass' fields were being correctly updated. * NumberFormat was throwing NPE for a null object because of an improved detail message, despite being specified to throw IAE. * We weren't mapping NumberFormat.Field instances to the corresponding icu4c UNUM_x_FIELD constant, so we weren't actually setting FieldPosition objects correctly. * SimpleDateFormat was not formatting milliseconds correctly with 'S'. * NativeDecimalFormat wasn't handling JNI NewString OOME correctly. Bug: 2528220 Bug: 3056865 Bug: 3057080 Bug: 3057090 Change-Id: Iac11f902f2e9649e596e7e7b7bc501b13e956fca
|
ac7cf58962995825464af08ae6fa5e006c94f3fa |
|
27-Feb-2013 |
Elliott Hughes <enh@google.com> |
Switch to using icu4c 50's TimeZoneNames API. This takes us down from ~330ms/locale on prime to ~70ms/locale. This also fixes a bug in DateFormatSymbols.getZoneStrings and adds a test so we don't regress. Change-Id: I13663a659666c0a7d87a299235b75fa4e9fef69d
|
92fc63ea7bdfcca72203ba0d183a43df0765cf79 |
|
08-Feb-2013 |
Elliott Hughes <enh@google.com> |
Implement UTS #35 5-count date format patterns. Bug: https://code.google.com/p/android/issues/detail?id=39616 Change-Id: I8143f75abc25b2f839a3e44ab800ad90ff9b9029
|
cf101d4099424a8e1ea603da5ddefd067f154b57 |
|
04-Feb-2013 |
Elliott Hughes <enh@google.com> |
Fix date parsing for time zones without names. Bug: 8128460 Change-Id: I41a6baee6e22b8af9170e3e569e0599c38b5e707
|
d43b9ef11a1095967a3396b246639b563e1a4128 |
|
12-Sep-2012 |
Kenny Root <kroot@google.com> |
Add consistent reasons for NullPointerException Semi-automated replacement of empty and non-conforming NullPointerException reason messages. (cherry-pick of 86acc043d3334651ee26c65467d78d6cefedd397.) Change-Id: I6d893979f5c20a50e841e32af9fd7b2d8bc9d54d
|
86acc043d3334651ee26c65467d78d6cefedd397 |
|
12-Sep-2012 |
Kenny Root <kroot@google.com> |
Add consistent reasons for NullPointerException Semi-automated replacement of empty and non-conforming NullPointerException reason messages. Change-Id: Iedeb4b21949e973c4042ce5982dda315f2e785e1
|
d8d3329347af700beed67172c77046b5c2ecece2 |
|
15-Jun-2011 |
Jesse Wilson <jessewilson@google.com> |
Kill another use of TimeZone.useDaylightTime(). I wrote another test to prove the use was incorrect. Change-Id: I86c5e53c735e7948b96c0d2a87abe21eb9aed876 http://b/2435103
|
8f7b815b21dd8dd884b7c0e16ea798d0f8e41314 |
|
25-Feb-2011 |
Elliott Hughes <enh@google.com> |
Fix more FindBugs warnings: DM_STRING_CTOR. These are the cases where we don't actually want to avoid memory leaks. Change-Id: Icc6c5506e5d415ff4fb5ff1351efee572a2af3e9
|
566bbb1d5a0ffadfc07fa58176587d4bd0d0be13 |
|
12-Feb-2011 |
Elliott Hughes <enh@google.com> |
Various time zone strings improvements. * Added a cache -- really a memo table -- to libcore.icu.TimeZones. I've also made the intern table global across all locales, for the common case where one language has many corresponding country codes (and thus locales) for which the strings are all the same. (I.e. this gives us deduplication across locales where before we only had it within locales.) We also eagerly populate the cache with both the default locale *and* en_US in the zygote, which should provide better behavior for everyone whose default locale isn't en_US. * Switched from linear search to binary search when pulling a row out of the zone strings table. We could hash these, but I currently have no reason to think we'd gain much speed for the space. * Removed the special-case hack I had to ask ICU for a single string. The new code largely removes the need for this, though one can imagine a theoretical app that will behave worse under the new regime, all plausible ones will benefit. * Switch ICU over to using an mmap(2)ed copy of its .dat file and tell it never to look for stuff on the file system. This doesn't actually work in any current version of ICU, though it is slightly faster by virtue of no longer looking for individual .res files (it still keeps looking for the same .dat file over and over). I'll work on fixing ICU later. This change takes us from about 1.1s/locale to 0.8s/locale. My current ICU hack takes that down to 0.3s/locale, which is still obscene, but it's another step in the right direction. * Fixed the "unambiguous abbrevations" logic in TimeZones.cpp so that all users of (say) CET to mean "Central European Time" get it, not just first. We really just wanted to avoid the situation where there's a "Central Excellent Time" or whatever, whose CET would *conflict* with the first one we learned about. Multiple references to the same time zone are not conflicts. * Moved clone2dStringArray to the only place it's really needed. * Slightly better documentation for Comparator. * More tests, including the one for CET formatting that I should have added when I fixed CET parsing, which would have shown me the error of my old ways. Bug: 3443476 Change-Id: If1d50e6273fc98a38139f14445265ce0be5e09dd
|
162b0775772fa66b7eb634760a8159a60c1ddcea |
|
02-Oct-2010 |
Elliott Hughes <enh@google.com> |
Move more stuff out of icu4jni; ICU and LocaleData. Bug: 3045778 Change-Id: I59fd27920a2da9a42b29fd79b8d81bdaabdef8cd
|
d2d7abef3e9b73a57cdf1f2afd678d7f48945679 |
|
12-Sep-2010 |
Elliott Hughes <enh@google.com> |
Document Unicode versions and that we don't support the locale spi junk. Bug: 2860486 Bug: 2938123 Change-Id: I3eb587300ea97340cdc23ba2d0136b8eeeb99b25
|
7365de1056414750d0a7d1fdd26025fd247f0d04 |
|
12-Aug-2010 |
Jesse Wilson <jessewilson@google.com> |
Sorting imports. Change-Id: I8347bc625480a1c37a1ed9976193ddfedeb00bbc
|
21557bb6a8f35a2f9889adba449cac950c9d41b9 |
|
23-Jun-2010 |
Elliott Hughes <enh@google.com> |
Add TimeZones.forLocale, plus some tidying. The new feature here is TimeZones.forLocale and the accompanying JNI. I've also taken the liberty of pulling the time zone stuff out of ICU.java and ICU.cpp, and I've moved some of the ICU-related code I've written recently (NativeIDN, NativeNormalizer, and NativePluralRules) into a new libcore.icu package. I've also renamed various things so the implementation details use the same terminology as the thing they're implementing. Bug: 2790386 Change-Id: Ie39a2f5f7023e8e29864de15790be8a660f5cba6
|
2cde53e669fdf0422c4dda13f5766dc68a7f63ce |
|
12-Jun-2010 |
Elliott Hughes <enh@google.com> |
Fix serialization of DateFormatSymbols after https://android-git.corp.google.com/g/54091. I added non-RI fields, but didn't make them transient. This patch fixes that (so we write RI-compatible serialized forms), and copes with reading in RI-compatible forms (that don't have the stand-alone names) by falling back to the regular names. Bug: http://b/2633414 Change-Id: I03f6fae78f09fc9cb9235d16cb982944069ef292
|
143e8c9cf91cfc01c3c91c8e93cad661ec7554ee |
|
11-Jun-2010 |
Elliott Hughes <enh@google.com> |
Support stand-alone month and weekday names in SimpleDateFormat. Also rewrite the SimpleDateFormat documentation. Bug: 2633414 Change-Id: I8fcc3b1f73dd6f264dd292852a8ab0c5a2742f5b
|
162a12c1442641a95fe95859fa4e561b22db049f |
|
25-May-2010 |
Elliott Hughes <enh@google.com> |
Remove @hide from Java 6 API. I've left the two new spi packages @hidden, because I think we shouldn't support them without convincing demand from developers (and I don't believe there could be such a thing --- they just don't make sense, and if we add anything, it should be the ability to provide extra ICU data). Also fix a handful of javadoc syntax errors in Arrays.java and TreeMap.java. Bug: 2497395 Change-Id: I4176b72daff0face4ed6c7ee1d1f4267d52006b4
|
bd55297544e2db648bce35c605c9257903fcb8aa |
|
18-May-2010 |
Elliott Hughes <enh@google.com> |
Add error checking in setZoneStrings and improve the documentation. Also some internal tidying, and a few more test expectations. Change-Id: Ic183baecab7d12151fcdb3b73842c345075b173c
|
f33eae7e84eb6d3b0f4e86b59605bb3de73009f3 |
|
13-May-2010 |
Elliott Hughes <enh@google.com> |
Remove all trailing whitespace from the dalvik team-maintained parts of libcore. Gentlemen, you may now set your editors to "strip trailing whitespace"... Change-Id: I85b2f6c80e5fbef1af6cab11789790b078c11b1b
|
cec4dd4b1d33f78997603d0f89c0d0e56e64dbcd |
|
26-Apr-2010 |
Peter Hallam <peterhal@google.com> |
merge more modules into luni
|