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

Default decomposition mode in Collator

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 21
    • None
    • core-libs
    • b25
    • generic
    • generic

    Description

      The description of `Collator.NO_DECOMPOSITION` reads it is the default decomposition mode, but the implementation in Collator's constructor sets the decomposition to `CANONICAL_DECOMPOSITION`. Although the `RuleBasedCollator` which is the sole implementation within the JDK sets the decomposition to `NO_DECOMPOSITION`, It should be up to the implementation of Collator which makes the default, so the description in `NO_DECOMPOSITION` needs to be amended. (Changing the implementation since 1.1 would be too risky)

      PoC which returns `CANONICAL_DECOMPOSITION` by default:
      ```
      new RuleBasedCollator("< a< b< c< d").getDecomposition() == Collator.NO_DECOMPOSITION // false
      ```

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: