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

DecimalFormat and CompactNumberFormat do allow U+FFFE and U+FFFF in the pattern

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 22
    • None
    • core-libs
    • b15
    • generic
    • generic

      Both of these classes state that for the prefix and suffix of a String pattern, any Unicode character is allowed, except U+FFFE, U+FFFF, and the special symbols.

      This does not appear to be true, as the implementation makes no check for these characters, and you can create an instance of both classes with the mentioned characters serving as the prefix/suffix.

      Although not a big deal and it has been there for quite some time now, the claim should probably be removed if it is incorrect. See comments for code example.

            jlu Justin Lu
            jlu Justin Lu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: