8226876: Assertion in sun/util/locale/provider/CalendarDataUtility on Windows after JDK-8218960

Reviewed-by: clanger
This commit is contained in:
Naoto Sato 2019-06-28 08:48:17 -07:00
parent e81d3fa8c3
commit bb9049d3c1
2 changed files with 48 additions and 0 deletions

View file

@ -249,9 +249,15 @@ public class CalendarDataUtility {
switch (requestID) {
case FIRST_DAY_OF_WEEK:
value = calendarDataProvider.getFirstDayOfWeek(locale);
if (value == 0) {
value = MONDAY; // default for the world ("001")
}
break;
case MINIMAL_DAYS_IN_FIRST_WEEK:
value = calendarDataProvider.getMinimalDaysInFirstWeek(locale);
if (value == 0) {
value = 1; // default for the world ("001")
}
break;
default:
throw new InternalError("invalid requestID: " + requestID);