ICU-8951 Feedback from Markus's review - fixed regex pattern for legacy key, and one typo in comment.
X-SVN-Rev: 36435
This commit is contained in:
parent
2411d1606b
commit
509d9757b0
@ -3361,7 +3361,7 @@ public final class ULocale implements Serializable, Comparable<ULocale> {
|
||||
// keys are using ASCII alphabetic letters only. We won't add any new key
|
||||
// that is not compatible with the BCP 47 syntax. Therefore, we assume
|
||||
// a valid key consist from [0-9a-zA-Z], no symbols.
|
||||
if (keyword.matches("[0-9a-zA-Z]*")) {
|
||||
if (keyword.matches("[0-9a-zA-Z]+")) {
|
||||
legacyKey = AsciiUtil.toLowerString(keyword);
|
||||
}
|
||||
}
|
||||
|
@ -4563,7 +4563,7 @@ public class ULocaleTest extends TestFmwk {
|
||||
{"variableTop", "00A0", "00a0"}, // valid codepoints type
|
||||
{"variableTop", "wxyz", "wxyz"}, // invalid codepoints type - return as is for now
|
||||
{"kr", "space-punct", "space-punct"}, // valid reordercode type
|
||||
{"kr", "digit-spacepunct", "digit-spacepunct"}, // invalid reordercode type, bad ok for legacy syntax
|
||||
{"kr", "digit-spacepunct", "digit-spacepunct"}, // invalid reordercode type, but ok for legacy syntax
|
||||
};
|
||||
|
||||
for (String[] d : DATA) {
|
||||
|
Loading…
Reference in New Issue
Block a user