review request for 6798511/6860431: Include functionality of Surrogate in Character

Martin Buchholz martinrb at google.com
Mon Mar 22 22:27:37 UTC 2010


Ulf,

I'd like to start a mq patch containing changes to
the String exception handling in the string classes.
Please provide me with a patch that uses the
blessed conventional names from Preconditions.java.

For the version that checks an offset and length for
containment within a larger sequence, I would prefer
the name "checkSubsequence", for example

private static void checkSubsequence(int start, int len, int size)

Please make sure that there are sufficient tests in
test/java/lang/String to ensure that you are not
inadvertently making changes to the exceptions thrown.

I note that test/java/lang/String/{Exceptions,Supplementary}
do try to test exception handling, but do not appear to
test for the *exact* class of the exception thrown,
nor the detail message of the exception.
When those tests were written, compatibility was less important.

Please adapt my
test/java/util/ArrayList/RangeCheckMicroBenchmark.java
to test string classes instead.
There is a good chance that you can demonstrate
a performance improvement on ordinary String operations!

Thanks,

Martin



More information about the core-libs-dev mailing list