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

Default decomposition mode in Collator

XMLWordPrintable

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

      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
      ```

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

              Created:
              Updated:
              Resolved: