497f79f9a5c4fad29d33aa70e69c77180c86e725 |
|
02-Feb-2010 |
Elliott Hughes <enh@google.com> |
FindBugs didn't like setInternalField, and neither do I. "Exception is caught when Exception is not thrown in java.text.DecimalFormat$1.run()" Since it will always fail anyway, because those fields don't exist, let's just junk it. It turns out that getInternalField is similarly useless, so junk it too. I've tidied the whole readObject method so it's somewhat readable now. I also fixed this FindBugs warning in passing: "Method java.text.DecimalFormat.parse(String, ParsePosition) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead"
|
387a5041075822ab578065d502ac9e6075864c2e |
|
29-Jan-2010 |
Elliott Hughes <enh@google.com> |
Fix tests.api.java.io.SerializationStressTest3.test_18_116_writeObject. The dead field 'minExponentDigits' was of type 'byte', not 'int'. Also add detail to serialization exception messages (this isn't just test code --- ObjectInputStream calls this).
|
b7df12f1bb73889f354806213b218a3a7d986448 |
|
29-Jan-2010 |
Elliott Hughes <enh@google.com> |
Use DecimalFormatSymbols' new default constructor for speed. This brings "new DecimalFormat" down to ~80us (from ~260us before this patch, or ~600us this time last week). Also remove some dead code and tighten up some accessibility. Depends on https://android-git.corp.google.com/g/38877.
|
fc7f3e4e4e169f08577a37fbe02cc2a80fba77d2 |
|
28-Jan-2010 |
Elliott Hughes <enh@google.com> |
Fix NumberFormat's behavior with BigInteger and custom Number subclasses. Also remove a few bits of cruft I ran across, and stop duplicating the documentation between NumberFormat and DecimalFormat. Bug: 2387934
|
536a964538d43749cfb88b3023bc4f8c31588b9a |
|
27-Jan-2010 |
Elliott Hughes <enh@google.com> |
Rename icu4jni's DecimalFormat to NativeDecimalFormat, to reduce confusion.
|
eb5822b70b3e578dbe692a60b8a93b90a9d4df93 |
|
26-Jan-2010 |
Elliott Hughes <enh@google.com> |
Simplify our DecimalFormat. Both the is-a and has-a hierarchies for our DecimalFormat implementation were over-complicated. This patch starts to address that, and makes cloning twice as fast (50us versus 100us), but not as fast as I'd like (<10us), and without making much of a dent in the time it takes to create a new NumberFormat (550us versus 600us). The speed of cloning is important because Formatter has a hack that uses it, and I want to change NumberFormat so that it always hands out clones... at least until I have time to make "new NumberFormat" acceptably fast. Also fixes DecimalFormat.applyLocalizedPattern (which used to behave as if you'd called applyPattern).
|
c9bb8b9827b5731d51fb9d99695256a17359af3f |
|
05-Jan-2010 |
Elliott Hughes <enh@google.com> |
Last bunch of NumberFormat speedups. Don't mess around with setCurrency in DecimalFormat.copySymbols when we're going to override any effect that call will have had in the next few lines: we always call setCurrencySymbol and setInternationalCurrencySymbol, so setCurrency is just wasting time. Replaces the NativeDecimalFormat.UNumberFormatSymbol enum -- which was only used for getting ints to pass to native code, using Enum.ordinal -- with ints. Adds a constructor to the java.text DecimalFormat so we can avoid cloning the DecimalFormatSymbols object we create for its private use. This is another 10% shaved off. I've also removed an unused local from the icu4jni DecimalFormat, so I can remove a then-unused getLocale method from the ICU DecimalFormatSymbols. I've rewritten the icu4jni DecimalFormatSymbols.clone to remove the scary constructor that took an arbitrary int and treated it as a uintptr_t when talking to native code.
|
32881d70f0df98abf9ce9a2a6a7a69ab3e069d26 |
|
05-Jan-2010 |
Elliott Hughes <enh@google.com> |
Speed up DecimalFormatSymbols. We don't need to create temporary String objects; we can just pass a char directly. We also don't need to initialize aspects of our native peer if we know we're going to overwrite them straight away, and making copying into ICU the responsibility of the icu4jni class rather than the java.text is slightly cleaner. Together, these changes make creating a new NumberFormat about 20% faster.
|
e3c868c0d0db63e4ec97fad40c5f3b81e308b723 |
|
23-Dec-2009 |
Elliott Hughes <enh@google.com> |
Stop using ResourceBundle for locale data. This offers an additional speed increase and gets rid of a lot of native code.
|
72e93344b4d1ffc71e9c832ec23de0657e5b04a5 |
|
13-Nov-2009 |
Jean-Baptiste Queru <jbq@google.com> |
eclair snapshot
|
f2173758085110964523dcc11a7a8bc1c44d23c5 |
|
24-Aug-2009 |
Jesse Wilson <jessewilson@google.com> |
Update java.text to Harmony r802921. Notable changes: - Replaced some StringBuffers with StringBuilders - Harmony moved to ICU, we stayed with ResourceBundles - Harmony now uses ICU's Bidi, we continue to use BidiWrapper - Fixed DateFormat.readResolve() - Fixed DecimalFormat serialization for setMaximumIntegerDigits - Fixed currency to support "XXX" for null - Support for null in MessageFormat.format() - Rearranged methods in SimpleDateFormat. Body is the same. - Fixed tests for Bidi.getRunLimit(). These are new failures. commit 112ab830475bc1a1fab9c7a16589b5525892e6a0 Merge: 39b03a1 62c2b2e Author: Jesse Wilson <jessewilson@google.com> Date: Mon Aug 24 14:03:31 2009 -0700 Merge dalvik and Harmony for java.text Conflicts: libcore/text/.classpath libcore/text/META-INF/MANIFEST.MF libcore/text/build.xml libcore/text/make/exclude.common libcore/text/make/run-test.xml libcore/text/src/main/java/java/text/Annotation.java libcore/text/src/main/java/java/text/AttributedCharacterIterator.java libcore/text/src/main/java/java/text/AttributedString.java libcore/text/src/main/java/java/text/Bidi.java libcore/text/src/main/java/java/text/BreakIterator.java libcore/text/src/main/java/java/text/CharacterIterator.java libcore/text/src/main/java/java/text/ChoiceFormat.java libcore/text/src/main/java/java/text/CollationElementIterator.java libcore/text/src/main/java/java/text/CollationKey.java libcore/text/src/main/java/java/text/Collator.java libcore/text/src/main/java/java/text/DateFormat.java libcore/text/src/main/java/java/text/DateFormatSymbols.java libcore/text/src/main/java/java/text/DecimalFormat.java libcore/text/src/main/java/java/text/DecimalFormatSymbols.java libcore/text/src/main/java/java/text/FieldPosition.java libcore/text/src/main/java/java/text/Format.java libcore/text/src/main/java/java/text/MessageFormat.java libcore/text/src/main/java/java/text/NumberFormat.java libcore/text/src/main/java/java/text/ParseException.java libcore/text/src/main/java/java/text/ParsePosition.java libcore/text/src/main/java/java/text/RuleBasedCollator.java libcore/text/src/main/java/java/text/SimpleDateFormat.java libcore/text/src/main/java/java/text/StringCharacterIterator.java libcore/text/src/test/java/org/apache/harmony/text/tests/java/text/AttributedCharacterIteratorAttributeTest.java libcore/text/src/test/java/org/apache/harmony/text/tests/java/text/BidiTest.java libcore/text/src/test/java/org/apache/harmony/text/tests/java/text/CollationElementIteratorTest.java libcore/text/src/test/java/org/apache/harmony/text/tests/java/text/DateFormatSymbolsTest.java libcore/text/src/test/java/org/apache/harmony/text/tests/java/text/DateFormatTest.java libcore/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatSymbolsTest.java libcore/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatTest.java libcore/text/src/test/java/org/apache/harmony/text/tests/java/text/FieldPositionTest.java libcore/text/src/test/java/org/apache/harmony/text/tests/java/text/MessageFormatTest.java libcore/text/src/test/java/org/apache/harmony/text/tests/java/text/ParsePositionTest.java libcore/text/src/test/java/org/apache/harmony/text/tests/java/text/RuleBasedCollatorTest.java libcore/text/src/test/java/org/apache/harmony/text/tests/java/text/SimpleDateFormatTest.java commit 39b03a1b2b150d468cc15d8ff8a92a07c9098a5c Author: Jesse Wilson <jessewilson@google.com> Date: Wed Aug 19 17:00:36 2009 -0700 text_dalvik commit 62c2b2e932da51858998820fe2558631999c1241 Author: Jesse Wilson <jessewilson@google.com> Date: Wed Aug 19 17:00:23 2009 -0700 text_802921 commit 2da8bc3457b9db827d96652e2bf159b7d5040ad1 Author: Jesse Wilson <jessewilson@google.com> Date: Wed Aug 19 17:00:08 2009 -0700 text_527399
|
f6c387128427e121477c1b32ad35cdcaa5101ba3 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
|
f72d5de56a522ac3be03873bdde26f23a5eeeb3c |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
|
89c1feb0a69a7707b271086e749975b3f7acacf7 |
|
18-Dec-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Code drop from //branches/cupcake/...@124589
|
2ad60cfc28e14ee8f0bb038720836a4696c478ad |
|
21-Oct-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Initial Contribution
|