LANG-1669: Fixed issue with parsing certain locales using day periods introduced in OpenJDK 16 and later resolved in OpenJDK 17 (#791)
This commit is contained in:
parent
a6df7f7456
commit
03edee7451
|
@ -756,7 +756,10 @@ public class FastDateParser implements DateParser, Serializable {
|
|||
// match missing the optional trailing period
|
||||
iVal = lKeyValues.get(lowerCase + '.');
|
||||
}
|
||||
calendar.set(field, iVal.intValue());
|
||||
//LANG-1669: Mimic fix done in OpenJDK 17 to resolve issue with parsing newly supported day periods added in OpenJDK 16
|
||||
if (Calendar.AM_PM != this.field || iVal <= 1) {
|
||||
calendar.set(field, iVal.intValue());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue