JDK-8218960 : CONFIG level logging statements printed in CLDRCalendarDataProviderImpl.java even when default log Level is INFO
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 10,11,12,13
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_10
  • CPU: x86_64
  • Submitted: 2019-02-12
  • Updated: 2020-02-17
  • Resolved: 2019-02-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13
11.0.4Fixed 13 b10Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
ADDITIONAL SYSTEM INFORMATION :
Windows 10 / OpenJDK 11.0.1

A DESCRIPTION OF THE PROBLEM :
CLDRCalendarDataProviderImpl seems to have some bug that is logged on CONFIG level which maps to INFO level when one uses the SLF4J bridge for JUL.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Start a JShell and execute the snippet given below

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No log output about things that should not happen
ACTUAL -
Feb 12, 2019 5:20:54 PM sun.util.locale.provider.LocaleServiceProviderPool config
CONFIG: A locale sensitive service provider returned null for a localized objects,  which should not happen.  provider: sun.util.cldr.CLDRCalendarDataProviderImpl@887af79 locale: en
Feb 12, 2019 5:20:54 PM sun.util.locale.provider.LocaleServiceProviderPool config
CONFIG: A locale sensitive service provider returned null for a localized objects,  which should not happen.  provider: sun.util.cldr.CLDRCalendarDataProviderImpl@887af79 locale: en
Feb 12, 2019 5:20:54 PM sun.util.locale.provider.LocaleServiceProviderPool config
CONFIG: A locale sensitive service provider returned null for a localized objects,  which should not happen.  provider: sun.util.cldr.CLDRCalendarDataProviderImpl@887af79 locale: en
Feb 12, 2019 5:20:54 PM sun.util.locale.provider.LocaleServiceProviderPool config
CONFIG: A locale sensitive service provider returned null for a localized objects,  which should not happen.  provider: sun.util.cldr.CLDRCalendarDataProviderImpl@887af79 locale: en
$14 ==> java.text.SimpleDateFormat@5a0f0632

The four log lines are:
* once for current locale `"en"`, key `"firstDayOfWeek"`
* once for current locale `""`, key `"firstDayOfWeek"`
* once for current locale `"en"`, key `"minimalDaysInFirstWeek"`
* once for current locale `""`, key `"minimalDaysInFirstWeek"`
in sun.util.locale.provider.LocaleServiceProviderPool#getLocalizedObjectImpl

My guess is that maybe this commit causes the issue: http://hg.openjdk.java.net/jdk/jdk/rev/57148c79bd75

---------- BEGIN SOURCE ----------
import java.text.SimpleDateFormat;
import java.util.logging.ConsoleHandler;
import java.util.logging.Logger;

import static java.util.Arrays.stream;
import static java.util.Locale.ENGLISH;
import static java.util.logging.Level.ALL;
import static java.util.logging.LogManager.getLogManager;

    ConsoleHandler handler = new ConsoleHandler();
    handler.setLevel(ALL)

    Logger rootLogger = getLogManager().getLogger("");
    stream(rootLogger.getHandlers()).forEach(rootLogger::removeHandler)
    rootLogger.setLevel(ALL)
    rootLogger.addHandler(handler)

    new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z", ENGLISH)

---------- END SOURCE ----------

FREQUENCY : always



Comments
Fix Request: Requesting backport of this patch to JDK 11 updates to match with Oracle. Patch applies cleanly net copyright year in src/java.base/share/classes/sun/util/locale/provider/CalendarDataUtility.java. Fix will be run through SAP's test system before pushing.
15-05-2019

CLDRCalendarDataProviderImpl seems to have been returning null even for normal situations.
14-02-2019

To reproduce the issue, run the attached test case. JDK 8u201 - Pass JDK 9.0.1 - Pass JDK 10-ea + 35 - Pass JDK 10-ea + 36 - Fail JDK 11.0.1 - Fail JDK 12-ea + 30 - Fail JDK 13-ea + 6 - Fail Output : Feb. 14, 2019 11:03:26 A.M. sun.util.locale.provider.LocaleServiceProviderPool config CONFIG: A locale sensitive service provider returned null for a localized objects, which should not happen. provider: sun.util.cldr.CLDRCalendarDataProviderImpl@5b480cf9 locale: en Feb. 14, 2019 11:03:26 A.M. sun.util.locale.provider.LocaleServiceProviderPool config CONFIG: A locale sensitive service provider returned null for a localized objects, which should not happen. provider: sun.util.cldr.CLDRCalendarDataProviderImpl@5b480cf9 locale: en Feb. 14, 2019 11:03:26 A.M. sun.util.locale.provider.LocaleServiceProviderPool config CONFIG: A locale sensitive service provider returned null for a localized objects, which should not happen. provider: sun.util.cldr.CLDRCalendarDataProviderImpl@5b480cf9 locale: en Feb. 14, 2019 11:03:26 A.M. sun.util.locale.provider.LocaleServiceProviderPool config CONFIG: A locale sensitive service provider returned null for a localized objects, which should not happen. provider: sun.util.cldr.CLDRCalendarDataProviderImpl@5b480cf9 locale: en
14-02-2019