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

Collator provider from SPI Adapter is loaded when they are assumed to be from JRE adapter

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: 8
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      One collator provider implementation that supports locale de_DE is in the java extension directory. The test program runs
      "RuleBasedCollator collator = (RuleBasedCollator) Collator.getInstance(new Locale ("de", "DE"));" to get the Collator intance of de_DE.

      When running the test program, no adapter is specified in Djava.locale.providers. The default value, "JRE,SPI", is used.

      In the java release before 8 b55, where there is no adapter, the rule of JRE is returned. JRE supports de_DE, so the provider in SPI is not loaded.

      Beginning from 8 b55, where there is the adapter, the rule of SPI is provided. It seems that the fall back is de_DE in SPI first.

      This breaks the compatibility. For some locales, existing java program that does not specify adapter will return different Collator provider since b55.

      Attached are the source of provider, the provider jar file, the test program, and the screen shot of test output.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                naoto Naoto Sato
                Reporter:
                yhuang Yong Huang
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: