src/share/classes/java/util/Calendar.java

Print this page

        

*** 2697,2712 **** private void setWeekCountData(Locale desiredLocale) { /* try to get the Locale data from the cache */ int[] data = cachedLocaleData.get(desiredLocale); if (data == null) { /* cache miss */ - LocaleProviderAdapter adapter = LocaleProviderAdapter.getAdapter(CalendarDataProvider.class, desiredLocale); - CalendarDataProvider provider = adapter.getCalendarDataProvider(); data = new int[2]; ! data[0] = provider.getFirstDayOfWeek(desiredLocale); ! data[1] = provider.getMinimalDaysInFirstWeek(desiredLocale); ! assert data[0] != 0 && data[1] != 0; cachedLocaleData.putIfAbsent(desiredLocale, data); } firstDayOfWeek = data[0]; minimalDaysInFirstWeek = data[1]; } --- 2697,2709 ---- private void setWeekCountData(Locale desiredLocale) { /* try to get the Locale data from the cache */ int[] data = cachedLocaleData.get(desiredLocale); if (data == null) { /* cache miss */ data = new int[2]; ! data[0] = CalendarDataUtility.retrieveFirstDayOfWeek(desiredLocale); ! data[1] = CalendarDataUtility.retrieveMinimalDaysInFirstWeek(desiredLocale); cachedLocaleData.putIfAbsent(desiredLocale, data); } firstDayOfWeek = data[0]; minimalDaysInFirstWeek = data[1]; }