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

no-placeholder compact number patterns throw IllegalArgumentException

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 16
    • 16
    • core-libs
    • None
    • b12
    • generic
    • generic

    Description

      Upcoming CLDR 38 will have compact number patterns without a placeholder:

      https://unicode-org.atlassian.net/browse/CLDR-11045

      Current JDK will throw an exception for such pattern as:

      ```
      java.lang.IllegalArgumentException: Invalid pattern [Kun]: all patterns must include digit placement 0s
      at java.base/java.text.CompactNumberFormat.applyPattern(CompactNumberFormat.java:1405)
      at java.base/java.text.CompactNumberFormat.lambda$processCompactPatterns$0(CompactNumberFormat.java:1167)
      at java.base/java.util.regex.Matcher$1MatchResultIterator.forEachRemaining(Matcher.java:1358)
      at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
      at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
      at java.base/java.text.CompactNumberFormat.processCompactPatterns(CompactNumberFormat.java:1167)
      at java.base/java.text.CompactNumberFormat.<init>(CompactNumberFormat.java:464)
      ```

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: