mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8224105: Cannot parse JapaneseDate string on some specified locales
Reviewed-by: bchristi
This commit is contained in:
parent
94619467c8
commit
8f1d837e99
2 changed files with 25 additions and 2 deletions
|
@ -257,11 +257,13 @@ public class CalendarNameProviderImpl extends CalendarNameProvider implements Av
|
|||
return langtags;
|
||||
}
|
||||
|
||||
// Check if each string is unique, except null or empty strings,
|
||||
// as these strings are used for keys in the name-to-value map.
|
||||
private boolean hasDuplicates(String[] strings) {
|
||||
int len = strings.length;
|
||||
for (int i = 0; i < len - 1; i++) {
|
||||
String a = strings[i];
|
||||
if (a != null) {
|
||||
if (a != null && !a.isEmpty()) {
|
||||
for (int j = i + 1; j < len; j++) {
|
||||
if (a.equals(strings[j])) {
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue