Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8245241

Incorrect locale provider preference is not logged

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 15
    • None
    • core-libs
    • b25
    • generic
    • generic
    • Verified

        If an incorrect system property for locale providers is set, it should be logged and presetned to the user, but it's not in reality. There's such code in LocaleProvderAdapter static initializer:
        ---
                        } catch (IllegalArgumentException | UnsupportedOperationException e) {
                            // could be caused by the user specifying wrong
                            // provider name or format in the system property
                            LocaleServiceProviderPool.config(LocaleProviderAdapter.class, e.toString());
                        }
        ---
        However, this ends up in jdk.internal.logger.SurrogateLogger which only logs JUL_DEFAULT_LEVEL( = PlatformLogger.Level.INFO) or more severe ones, ie., the message, which is CONFIG, will never be logged.

              naoto Naoto Sato
              naoto Naoto Sato
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: