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

[Fmt-Me] MessageFormat.toPattern produces wrong quoted string and subformat modifiers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 7
    • 6
    • core-libs
    • b126
    • generic
    • generic
    • Verified

      MessageFormat.toPattern produces a pattern string which isn't correctly quoted. Therefore, applying the produced pattern doesn't create the same state of the MessageFormat instance from which the pattern has been produced.

      For example, pattern "'{{'" produces formatted string "{{". Its toPattern() produces "'{''{'". applyPattern("'{''{'") produces formatted string "{'{".
      toPattern() also has an assumption about implementation classes of DateFormat and NumberFormat, which is not valid because of the SPI support.

            okutsu Masayoshi Okutsu
            okutsu Masayoshi Okutsu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: