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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 7
    • Affects Version/s: 6
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: