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
|
bbe3e7f1f8c312fcfbd7af2ecbfa98c48f502c61 |
|
30-Jul-2012 |
Elliott Hughes <enh@google.com> |
De-pessimize the String(byte[], int, int) constructor. Also add a few tests. Before: 0% Scenario{vm=app_process, trial=0, benchmark=_new_String_BII, length=1, name=UTF-8} 155838.96 ns; σ=1179.42 ns @ 3 trials 10% Scenario{vm=app_process, trial=0, benchmark=_new_String_BII, length=10, name=UTF-8} 170741.68 ns; σ=10178.36 ns @ 10 trials 40% Scenario{vm=app_process, trial=0, benchmark=_new_String_BII, length=10000, name=UTF-8} 3867968.18 ns; σ=347173.32 ns @ 10 trials Change-Id: Ic1a8a46a81faf1afc807cfff132565e87944994b After: 0% Scenario{vm=app_process, trial=0, benchmark=_new_String_BII, length=1, name=UTF-8} 4563.80 ns; σ=7.13 ns @ 3 trials 10% Scenario{vm=app_process, trial=0, benchmark=_new_String_BII, length=10, name=UTF-8} 6667.55 ns; σ=862.26 ns @ 10 trials 40% Scenario{vm=app_process, trial=0, benchmark=_new_String_BII, length=10000, name=UTF-8} 1836705.08 ns; σ=71293.06 ns @ 10 trials
|
892c36b1c1eee25ad46bac6fffdf129219a5e98d |
|
29-Jun-2011 |
Philip Milne <pmilne@google.com> |
Remove the contentEquals() method that was added to java.lang.String. The public (though hidden) method contentEquals(char[], int, int) was added to java.lang.String to avoid creating large numbers of Strings during XML parsing. That objective is preserved with this change, which uses a private static method with a similar implementation that goes through the regular String API. Change-Id: I808e1ebc4ef6812dd651682628167b4c078af334
|
8bc9296d071a77994b6418df2edb120d6a9f70ac |
|
24-May-2011 |
Elliott Hughes <enh@google.com> |
Fix the deprected overload of String.getBytes. Previously, this would unconditionally throw ;-) Change-Id: Ia62eb6febcfca2a1a9f546935b092141e698d0b2
|
0d4daefcf389b6433a0af481ef44a84a2546541a |
|
21-May-2011 |
Elliott Hughes <enh@google.com> |
Suppress some FindBugs warnings. Also globally replace "for(" with "for (". Change-Id: I27fe17460e6745b9ca823f42e57c86fe8af31979
|
32c2297a959b72abdb18743f0519e1d8b7c7ea88 |
|
17-Mar-2011 |
Elliott Hughes <enh@google.com> |
Remove bogus "super()" calls. I've left one in java.util.concurrent, since we have an upstream there. Change-Id: I60945e48a41433fc7eaef6086433ec4bf434097f
|
363291564f107e500e0b584baa0377757cc2ae09 |
|
08-Mar-2011 |
Dan Bornstein <danfuzz@android.com> |
Consistency in and testing of exception throws. More of the former than the latter, but there will be follow-ups. Bug: 3500987 Change-Id: I5fcf0dab2c018b621921958cb4076d2964030862
|
08343a4ef77616fc420e51d1095c0d6a266041ba |
|
16-Feb-2011 |
Elliott Hughes <enh@google.com> |
Remove our implementations of inline natives. It turns out that our String.equals was getting used. Making dalvikvm's inline natives be native methods ensures that doesn't happen. I've also added a test to ensure we explicitly test both variants. Change-Id: Ie2a4b5289092da5ffca4a4273692f1048ab3b841
|
73ab73fc55e57f4936ce2f35ced41642630f6c6e |
|
09-Feb-2011 |
Elliott Hughes <enh@google.com> |
Slightly improve String.intern and Object.finalize documentation. Bug: 3144247 Change-Id: Ib6552d5989ab9e13341a1d9e754754d8b22ef655
|
6186821cb13f4ac7ff50950c813394367e021eae |
|
08-Feb-2011 |
Jesse Wilson <jessewilson@google.com> |
Move libcore.base classes to libcore.util and libcore.io. Change-Id: I2340a9dbad3561fa681a8ab47d4f406e72c913e3
|
51cb5459b4515f6c0c164a26c6244d8305bd89bb |
|
25-Jan-2011 |
Elliott Hughes <enh@google.com> |
Fix case-insensitive comparisons for dotted 'I'/dotless 'i'. Java uses its own case-folding scheme, distinct from any of the regular ones. Bug: 3325799 Change-Id: Id574d82a5a2e37533dbdb6d1d42d1821c56956b2
|
fb0ec0e650bf8be35acb0d47da0311a7c446aa33 |
|
14-Jan-2011 |
Elliott Hughes <enh@google.com> |
Remove useless android-changed comments. I've changed useful ones to regular comments or TODOs, as appropriate. I've left ones in code like java.util.concurrent where we really are tracking an upstream source, making the change markers useful. I've left a handful of others where I intend to actually investigate the implied TODOs before deciding how to resolve them. Change-Id: Iaf71059b818596351cf8ee5a3cf3c85586051fa6
|
a695e8fafadd2591cd148e78f19bc6d7c15121bb |
|
05-Jan-2011 |
Jesse Wilson <jessewilson@google.com> |
Just use String for upper case/lower case operations. Change-Id: If686975f659412c555684ed0032694e854e3aa8c http://b/2183747
|
b46dab348e2007bc08abaf7ecae34d89a2474e50 |
|
09-Dec-2010 |
Elliott Hughes <enh@google.com> |
Rewrite all backwards comparisons. Strictly, all the ones I could find. This is everything with 0 or null on the left-hand side. Note that this touches several incorrect bounds checks, which I haven't fixed: I'm going to come back and finish that independent cleanup separately. Change-Id: Ibdb054b53df9aace47c7d2a00ff19122190053e8
|
44a9f03a2d602c7179112284d878b0db9284eb30 |
|
08-Dec-2010 |
Elliott Hughes <enh@google.com> |
Improve StringIndexOutOfBoundsException throwing. Better, more-consistent detail messages, more regular naming, plus use of the one true bounds-checking idiom (including reversal of sense to reduce unnecessary indentation). (The lack of an inlining JIT means that I couldn't factor the bounds checking out, but at least we're working towards full duplicates rather than near-duplicates!) Change-Id: I59ded68169067305e747d30801c79a4c13f521b2
|
a78c2aac2a73f001aa00971adfae90af4d6726fb |
|
14-Nov-2010 |
Jesse Wilson <jessewilson@google.com> |
Add interning to KxmlPullParser. Adding just a small interning pool improves performance even further. Combined with the first round of optimizations, total improvement for three large files is 51% 56% and 42%. Performance on a small file improved 3%. When interning is checked in, Kxml will be significantly faster than Expat's pull parser for everything but very small files. /sdcard/xml/com.amazon.mp3.meta /sdcard/xml/com.cooliris.picasa /sdcard/xml/com.rhapsody.Deauth /sdcard/xml/com.snoggdoggler.r benchmark run us linear runtime % us linear runtime % us linear runtime % us linear runtime % Dom baseline / master 210,256 ============================== 184% 53,227 ============================== 171% 2,183 ============================== 151% 164,708 ============================= 200% Dom first optimizations 174,580 ======================== 153% 40,964 ======================= 132% 1,968 =========================== 136% 130,814 ======================= 159% Dom new interning 163,366 ======================= 143% 35,736 ==================== 115% 2,116 ============================= 147% 121,870 ====================== 148% ExpatPull baseline / master 130,078 ================== 114% 21,700 ============ 70% 759 ========== 53% 85,578 =============== 104% ExpatPull first optimizations 129,776 ================== 114% 21,621 ============ 70% 734 ========== 51% 86,799 =============== 105% ExpatPull new interning 130,971 ================== 115% 21,627 ============ 70% 723 ========= 50% 86,555 =============== 105% KxmlPull baseline / master 114,317 ================ 100% 31,040 ================= 100% 1,443 =================== 100% 82,478 =============== 100% KxmlPull first optimizations 88,716 ============ 78% 20,578 =========== 66% 1,560 ===================== 108% 58,567 ========== 71% KxmlPull new interning 55,773 ======= 49% 13,692 ======= 44% 1,394 =================== 97% 48,068 ======== 58% http://b/3090550 Change-Id: I4515546abbbcf940de7be22f26925c4334e59146
|
693eacca9fa67ad79d1b35dbaad61c5ac1ac457c |
|
10-Nov-2010 |
Elliott Hughes <enh@google.com> |
Stop allocating empty arrays. Bug: 3166662 Change-Id: I151de373b2bf53786d19824336fa434c02b0b0e8
|
f3b4a80f2ecd6dd1a0df51bb74a01042b11fad97 |
|
09-Nov-2010 |
Jesse Wilson <jessewilson@google.com> |
Provide indices and length when reporting StringIndexOutOfBoundsExceptions. Change-Id: Ib7e52678fd2aad0e15bd04b2db4b191670cd4703
|
9559e748729ef1deb6400f31d0407543cbff3566 |
|
21-Oct-2010 |
Elliott Hughes <enh@google.com> |
Improve our modified UTF-8 implementation. I was out looking for customers for the new OSMemory peek/poke for byte[]s, and ran into this mess. I also noticed we didn't have any real tests for DataOutputStream. This patch rewrites DataOuputStream and ObjectOutputStream to be simpler and cleaner, pulls modified UTF-8 encoding support out into ModifiedUtf8 where it belongs, and adds a new special ICU-avoiding case for String.getBytes("UTF-16BE"). And adds tests. Bug: 3032515 Change-Id: I618c8b1bda13138feed7710e29aee0f96f2e9b95
|
36f1fe647ee886d8d8a0d703ac2fbbcc8194c716 |
|
26-Sep-2010 |
Elliott Hughes <enh@google.com> |
Faster String.hashCode. Bend our code to fit our current JIT. The locals caching fields are still sadly necessary, even though the JIT usually does a good job of that. (Or have I actually been seeing the JIT do a bad job of local access instead, thanks to thumb's x86-like lack of registers? Need to start looking at more generated code to get an absolute "benchmark" to go with my relative [Caliper] benchmark figures.) Bug: 3031382 Change-Id: Icf63866b10740bd7001cc9f24e4e9c655aebc3f8
|
ab73941feb7f8677174cc97722201437edcb1299 |
|
03-Jul-2010 |
Jesse Wilson <jessewilson@google.com> |
Fix new String(String) to copy the backing array. Adding documentation explaining the backing array, and how it interacts with this copy constructor and substring(). Change-Id: I1044bcb614645e3f12c0701d5a883de6a65496f1
|
5cd6df2f627e06f9b7f714181d70d3148a3d6c60 |
|
01-Jul-2010 |
Elliott Hughes <enh@google.com> |
Part 2 of the "new String"/String.getBytes performance work. I didn't plan on a part 2, but my benchmark was bogus. I'd failed to take into account the fact that the ICU code (which I was comparing against) has a higher intercept but lower slope than the Java I replaced it with. This new code offers the best of both worlds: low intercept (start-up cost) and low slope (per-byte/char cost). The bad news is that this means I'm adding more native code. In addition to the improved benchmark, I'll commit a benchmark that contains the pure Java implementations so we can see when the JIT advances to the point that we can retire this native code. Change-Id: Ibac24c2e3deed216bd492acf2fac7554d3f96d85
|
870b23b3febc851c9cd2321f82a9971a34093e77 |
|
24-Jun-2010 |
Elliott Hughes <enh@google.com> |
Fix String.replace("", _). Bug: http://code.google.com/p/android/issues/detail?id=8807 Change-Id: Id587df266a547ff17db4dbb32493bed394a7c51e
|
151a7022d25b58cc2788f0cbe2922f9653e9ee7c |
|
23-Jun-2010 |
Elliott Hughes <enh@google.com> |
String should throw UnsupportedEncodingException if Charset.forName fails. Bug: 2788958 Change-Id: I1be003c58338a63c34294dfe0498c3f5ede10996
|
e810d3b49631329b11440aa5b7a54db181d42ed1 |
|
15-Jun-2010 |
Elliott Hughes <enh@google.com> |
More charset-related cleanup/optimization. This patch adds a Charsets class that lets us avoid a hash lookup and an extra level of method call indirection when calling String.getBytes or "new String" for a well-known guaranteed charset. It also fixes callers to take advantage. This also adds a special case to "new String" for the UTF-8 charset to avoid needless duplication if we guessed the correct buffer size (which we will for input that happens to be US-ASCII too). The ModifiedUtf8 class gives a more meaningful name for Utils.convertUTF8WithBuf. This also removes a dead link and un-tinyurl'ed another. Change-Id: I02712f53dee16feb3b1db2c14536dc055126cd04
|
c61e057ac9af32c1987d70d19cb2ead75ed8f612 |
|
09-Jun-2010 |
Elliott Hughes <enh@google.com> |
Optimize String.getBytes for ISO-8859-1, US-ASCII, and UTF-8. This is 10x faster for UTF-8 and 20x for US-ASCII/ISO-8859-1. Change-Id: Ie34c8d0522175c9e0a0433fe42bc1c2b1d328b49
|
d0628c5cb80e3c1270634c56a784329a4836b9aa |
|
08-Jun-2010 |
Elliott Hughes <enh@google.com> |
Make Charset.defaultCharset cheap. This is a slight behavioral change, but this is how the RI works: changing "file.encoding" after startup has no effect there either. Change-Id: I0fd44edd3aedcfd7f72cda572bb2ff3c44ad3ab9
|
c903e6720bbbf6540c29f141bd2fa559813ea20a |
|
08-Jun-2010 |
Elliott Hughes <enh@google.com> |
Improve Charset.forName/"new String" performance. Lookup String's default charset once at class initialization. Stop creating a new empty char[] every time we create an empty string. Fix the documentation not to lie about using ISO-8859-1 in all kinds of places we don't (and where the RI doesn't specify that we should). Fix the performance of the String(byte[]...String) and String(byte[]...Charset) constructors to be equivalent rather than wildly different (and not in the way anyone would reasonably expect). Canonicalize the requested charset's name so that we can uniformly optimize all aliases of those charsets we special-case, rather than just those few aliases we used to hard-code. Tidy up the String.getBytes methods in preparation for optimization (in a later patch). Fix the performance of Charset.forName to be amortized constant time regardless of what name is used, in recognition of the fact that Unicode TR#22 section 1.4 means that there are a potentially infinite number of valid pseudo-aliases for any charset (at least two of which are relatively common in libcore itself, so I'd imagine plenty are used in the wild too). Some slight synchronized-related tidying, and more reuse of public API (because one day I'd like to improve the locking situation deeper down in this code). In HistoricalNameUtil.java, remove ugliness. In File.java, use "new String" rather than junk from Util. In RandomAccessFile.java, reuse convertUTF8WithBuf instead of the otherwise unused convertFromUTF8 convenience method. In Util.java, remove now-dead code and comment some code that looks like it should be killed but is actually unique and necessary. (I'll probably move this into an intention-revealing class in my next patch. "Util", FFS! "UTF8", FFS!) Also add a couple of tests to StringTest.java to show that my improved String documentation is true, and that some bogus code that I removed was indeed bogus. Change-Id: I746f990172c51c30aa5f5037346644552a224841
|
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
|
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
|
5f37da05bb48298568f8abd7c97c3d11552e1867 |
|
11-May-2010 |
Elliott Hughes <enh@google.com> |
Documentation improvements. Remove a bunch of content-free "package.html" files, and rewrite the Pattern documentation. Change-Id: Ieb4eee940dbbeab21828b8d7b2f172732f9dd6de
|
3106a99ccbe2e2a25bb66266d0ee42d98dd18099 |
|
13-Apr-2010 |
Elliott Hughes <enh@google.com> |
Improve documentation about the user's default locale. Add a bit of text to Locale's class documentation, and include a link from every method that uses Locale.getDefault(). Also try to consistently say "user's default locale", as a subliminal hint that this isn't necessarily the developer's locale, nor en_US. Bug: 2593000 Change-Id: Ieebe864ed6b9fecbfef5d5415269299739cedd1b
|
9de899cc3ffd3aa3f8f827201cbe14120609018b |
|
13-Apr-2010 |
Elliott Hughes <enh@google.com> |
Fix String.toLowerCase and toUpperCase. Rather than try to cope with Lithuanian, let's just hand that one to ICU4C. I've removed my hand-crafted Azeri/Turkish lowercasing too, in favor of ICU. Presence of a high surrogate (which implies a supplemental character) is a good reason to hand over to ICU too. On the uppercasing side, I've kept our existing hard-coded table and just added code to defer to ICU for Azeri, Lithuanian, and Turkish (plus supplemental characters). I don't like the tables, but I don't have proof that they're incorrect. Bug: 2340628 Change-Id: I36b556b0444623a5aacc1afc58ebb4d84211d3dc
|
4a6cd08d55ec407dea29586cc917f8a423f5645f |
|
12-Apr-2010 |
Elliott Hughes <enh@google.com> |
Fix supplementary character support. Fixes all known bugs in our handling of supplementary characters. This change introduces a performance regression on the assumption that it won't be released without a corresponding JIT change to enable the code to be inlined back to pretty much what it used to be. Bug: 2587122 Change-Id: I3449c9718bbe32ebe53b6c10454ae1dc82105b59
|
d9d4093169787d2a52d0e392933f77ec08ff1045 |
|
10-Apr-2010 |
Elliott Hughes <enh@google.com> |
Throw the same exceptions as the RI from String methods. String has its own StringIndexOutOfBoundsException subclass of IndexOutOfBoundsException. We can run more tests if we behave the same. The RI only admits to IndexOutOfBoundsException, though, so our documentation and throws clause shouldn't change. Change-Id: Ib87777f8a42d4bcac21e8f8f00f4dcbc0ada4201
|
0510f0d8ce7c20b8f6022545a70e8b868805dc60 |
|
10-Apr-2010 |
Elliott Hughes <enh@google.com> |
Make String.split 10x faster. Almost all uses of String.split in the Android codebase use trivial single literal character separators. This patch optimizes that case to avoid the use of regular expressions entirely. The 10x speedup isn't the whole story, because the speedup is really proportional to the number of separators in the input. 10x is easily achievable, but the speedup could be arbitrarily high. Before: benchmark us logarithmic runtime PatternSplitComma 84.8 XXXXXXXXXXXXXX|||||||||||||| PatternSplitLiteralDot 85.0 XXXXXXXXXXXXXX|||||||||||||| StringSplitComma 166.3 XXXXXXXXXXXXXXXXXXXXXXXXXXXX| StringSplitHard 173.6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX StringSplitLiteralDot 167.7 XXXXXXXXXXXXXXXXXXXXXXXXXXXX| After: benchmark us logarithmic runtime PatternSplitComma 18.9 XXX||||||||||||||||||||| PatternSplitLiteralDot 19.0 XXX||||||||||||||||||||| StringSplitComma 18.8 XXX||||||||||||||||||||| StringSplitHard 174.2 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX StringSplitLiteralDot 18.8 XXX||||||||||||||||||||| (The benchmarks starting "Pattern" use a precompiled Pattern for performance. Those starting "String" use String.split and would traditional entail a temporary Pattern. As you can see, creating Patterns is very expensive for us, and each one throws a finalizer spanner in the GC works too. The new fast path avoids all this. I'll commit the benchmark -- along with all the others I've ever used -- to http://code.google.com/p/dalvik this afternoon.) Tests? We actually pass _more_ tests after this patch, because the increase in performance means we don't hit timeouts. Change-Id: I404298e21a78d72cf5ce6ea675844bf251e3825b
|
b43c9fb9c581d94304e9a54ec96cf4d752e8d917 |
|
10-Mar-2010 |
Elliott Hughes <enh@google.com> |
Add Java 6 additions to Double, Enum, Float, and String. I rewrote the documentation for Double, Enum, and Float, but the "code" is the same as harmony's. I rewrote the String code and wrote some tests to ensure that a malicious Charset can't subvert String immutability. I've also extracted the Android-specific bits of StringTest (which weren't testing String at all) and brought back the latest harmony StringTest.java. (The Class and Package changes are just to placate our API comparison tools.) Bug: 2497395 Change-Id: Id57bda806891c3c85adfcb3b85eea8a8fad2c7b4
|
3dd153c6795866734d66e6b5f69c40edae698f6d |
|
10-Mar-2010 |
Elliott Hughes <enh@google.com> |
Work around droiddoc bug http://b/2022288. Change-Id: Ib46a260916dee99f190aa8b9465f4f2d3b04aa67
|
66c28d7bc60d6dbe470147a2be8b01717cb38f06 |
|
10-Mar-2010 |
Elliott Hughes <enh@google.com> |
Another go at making droiddoc as happy as javadoc... Change-Id: I70dd8d57053a6e60b9be0cbe8a95d9937d9b00ef
|
a7127f86d49f9a8b0f7af92e229fee4a0e2831cd |
|
10-Mar-2010 |
Elliott Hughes <enh@google.com> |
Fix javadoc errors. Change-Id: Ib3eb500006f5b4b1dadf959397fce7737fb53fe7
|
438d9883775e6ee31c097e2103a25571d2426cd9 |
|
09-Mar-2010 |
Elliott Hughes <enh@google.com> |
Minor documentation improvements. Based on user-submitted bugs that were just misunderstandings, plus implementation bugs caused by the intended behavior being somewhat subtle. Change-Id: Ic2606b5e57dadc95a35c2d0a977c01434a2fa28a
|
31df07d33bf4730c76d5f11b802e8e2bd40baba9 |
|
03-Mar-2010 |
Elliott Hughes <enh@google.com> |
Add (but @hide) String.isEmpty and Locale.ROOT.
|
96b251cd6e3aa354b86330da0c598d538151be0a |
|
06-Jan-2010 |
Elliott Hughes <enh@google.com> |
Fix String.toLowerCase/toUpperCase for Azeri, Greek (all locales), and Turkish. This patch fixes Greek final sigma in all locales, treats Azeri locales like Turkish locales, and fixes our dotted/dotless-i/I behavior in Turkish locales (and thus now Azeri locales too). Still broken: behavior in Lithuanian locales, supplementary characters. I've also removed String's own optimized-for-ASCII toLowerCase(char) and toUpperCase(char): we've optimized Character's methods and don't want another copy. I've removed the unused String.getValue which provided access to the underlying char[] --- this wasn't used, and wouldn't work anyway without some way to access String's 'offset' and 'count' fields too.
|
9a501d6cb2a26c3b5d77497826ea33481716ab2d |
|
02-Dec-2009 |
Elliott Hughes <enh@google.com> |
Make java.util.Formatter perform acceptably (and fix two jtreg failures). Here are the slowdowns compared to hand-written StringBuilder.append code, for three cases: a long format string with no format specifiers, a long format string with a single %d, and a long format string with a single %s (in that order): passion-old: 54x 40x 10x sim-new: 1.7x 3.4x 5.3x passion-new: 9.2x 2.2x 1.8x Formatter has been changed to use a less expensive mechanism for parsing the format string, to not create expensive temporary objects unless they're actually needed (particularly strings used only in error messages), to not create a temporary StringBuilder in every transform* method, and to not charge for padding (or truncation) unless actually required. As Stroustrup would say, "you don't pay for what you don't use". Other changes: AbstractStringBuilder adds a special case for appending one StringBuilder to another, similar to its existing special case for String (because we do a much better job of copying a char[] with System.arraycopy than iterating over a CharSequence). Character reinstates the ASCII-range optimizations for isDigit and isUpperCase, both of which are used by Formatter. Bug 2295801 covers reinstating the rest of Character's special cases. String loses the unused inner class ConsolePrintStream, which isn't actually relevant to this change, but offended me greatly. CharBuffer gets a rewritten toString that's less inefficient. (This doesn't matter to us because the new Formatter doesn't use CharBuffer, but one shouldn't leave broken glass on the lawn.) The change to Formatter.close fixes a jtreg failure (and brings our implementation in line with our documentation, which already stated that multiple calls to Formatter.close only close the underlying Closeable once). The change to Formatter.format(Locale, ...) fixes a jtreg failure: any Formattable we call out to needs to be able to use Formatter.locale to find out the locale it's formatting for. I've reworded the documentation so that it's clearer (it was already correct, but ambiguous). Bug: 2272346
|
4fefecee9d4a5d2a4510f516b4015607b19e8d09 |
|
13-Nov-2009 |
Jean-Baptiste Queru <jbq@google.com> |
eclair snapshot
|
a389b4a499f40379b0b204d7ba1c2057663d95c0 |
|
11-Aug-2009 |
Jesse Wilson <jessewilson@google.com> |
Update Luni to Harmony r802921. Notable changes: - replaced StringBuffer with StringBuilder in several places - fixed a problem with BufferedInputStream's newline characters (EBCDIC) - cleanup Timer's finalizer helper object - new cache for the canonical path of a file - fixed concurrency issue with ArrayList - floating point parsing now trims length for very small numbers - encoding specified "UTF-8" when converting some byte[]s to strings (JarURLConnection, Util, OSFileSystem) - Harmony now implements floor and ceil in Java. We continue to use native code.
|
f5597e626ecf7949d249dea08c1a2964d890ec11 |
|
25-Jul-2009 |
Jesse Wilson <jessewilson@google.com> |
Integrate luni module (but not tests) to Harmony r772995. Notable changes - Stripped "@since Android 1.0" from many files. Most files are now 100% the same in Dalvik and Harmony. - AbstractStringBuilder.reverse() supports surrogates - AbstractStringBuilder shares less to waste less memory - Bitset optimized - BufferedInputStream changed to support unsynchronized close() - BufferedOutputStream does flushInternal - BufferedReader supports EBCDIC NEL - Collections.synchronizedList().indexOf() does a copy for more concurrency - Classes in nio module changed: DatagramChannelImpl, SocketChannelImpl and ServerSocketChannelImpl (these depend on internal APIs changed in this update) - DataInputStream/DataOutputStream now use a small buffer to limit the number of times the underlying stream is accessed - Date now has a minutes offset, more efficient toString() - ExposedByteArrayInputStream: new internal class - DeleteOnExit moved to top-level class - FileDescriptor.isValid() now non-native - Float, Double lessThan optimized (fix for compare(-0.0F, 0.0F) still pending) - FileURLConnection now guesses content types from streams - HashMap iterator changes - Hashtable iterator changes - INetworkSystem - removes bind2(), createMulticastSocket, sendStream(), - renames createSocket to createStreamSocket - JarURLConnection rewritten - LinkedHashMap: new iterator - Locale, Currency, TimeZone: now use ICU in Harmony, plain Java in Dalvik - ObjectInputStream: Accessor objects in Harmony, direct native in Dalvik - ProxyClassFile - many changes - String - optimized ascii for toLowerCase, toUpperCase, compare - Timer - rewritten - TreeMap - rewritten - URLClassLoader - new - URLConnection - new guessContentTypeFromStream(), uses org.apache.harmony.awt.www.content to lookup content type handlers
|
adc854b798c1cfe3bfd4c27d68d5cee38ca617da |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
|
1c0fed63c71ddb230f3b304aac12caffbedf2f21 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
|
dd828f42a5c83b4270d4fbf6fce2da1878f1e84a |
|
18-Dec-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Code drop from //branches/cupcake/...@124589
|
fdb2704414a9ed92394ada0d1395e4db86889465 |
|
21-Oct-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Initial Contribution
|