On Feb 6, 2014, at 5:37 AM, Xueming Shen <[email protected]> wrote:
> Fair enough. I don't think it's going to be a measurable difference. I have > updated the webrev > to use the Character.isSurrogate() for better readability. > > http://cr.openjdk.java.net/~sherman/8032012/webrev > One last point, sorry :-) Can you use Character.toUpperCase rather than Character.toUpperCaseEx ? [*]. Paul. [*] They both seem to point to the same code, so either Character.toUpperCase can incorrectly return Character.ERROR or Character.toUpperCaseEx never returns ERROR: public static int toUpperCase(int codePoint) { return CharacterData.of(codePoint).toUpperCase(codePoint); } static int toUpperCaseEx(int codePoint) { assert isValidCodePoint(codePoint); return CharacterData.of(codePoint).toUpperCaseEx(codePoint); } abstract class CharacterData { ... abstract int toUpperCase(int ch); ... //need to implement for JSR204 int toUpperCaseEx(int ch) { return toUpperCase(ch); }
