From ecfeb4ac297f728ea65d3bf5f1d432ff517dbd92 Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Tue, 27 Sep 2016 21:38:03 +0000 Subject: [PATCH] ICU-5456 minor changes for review feedback X-SVN-Rev: 39364 --- icu4j/main/classes/core/src/com/ibm/icu/impl/CaseMap.java | 2 ++ .../main/classes/core/src/com/ibm/icu/impl/UCaseProps.java | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/CaseMap.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/CaseMap.java index ed68fdbc99a..0d1c259b974 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/impl/CaseMap.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/CaseMap.java @@ -659,6 +659,8 @@ public final class CaseMap { * Probably simpler than a stateless function that has to figure out complex context-before * for each character. * TODO: Try to re-consolidate one way or another with the non-Greek function. + * + *

Keep this consistent with the C++ versions in ustrcase.cpp (UTF-16) and ucasemap.cpp (UTF-8). */ private static String toUpper(CharSequence s, int[] locCache) { StringBuilder result = new StringBuilder(s.length()); diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/UCaseProps.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/UCaseProps.java index afc01736a3d..927cdc03cdd 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/impl/UCaseProps.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/UCaseProps.java @@ -457,7 +457,7 @@ public final class UCaseProps { return getTypeFromProps(trie.get(c)); } - /** @return same as ucase_getType() and set bit 2 if c is case-ignorable */ + /** @return like getType() but also sets IGNORABLE if c is case-ignorable */ public final int getTypeOrIgnorable(int c) { return getTypeAndIgnorableFromProps(trie.get(c)); } @@ -1335,15 +1335,17 @@ public final class UCaseProps { public static final int UPPER=2; public static final int TITLE=3; + /** @return NONE, LOWER, UPPER, TITLE */ private static final int getTypeFromProps(int props) { return props&TYPE_MASK; } + /** @return like getTypeFromProps() but also sets IGNORABLE if props indicate case-ignorable */ private static final int getTypeAndIgnorableFromProps(int props) { return props&7; } - public static final int IGNORABLE= 4; + static final int IGNORABLE=4; private static final int SENSITIVE= 8; private static final int EXCEPTION= 0x10; -- 2.40.0