DecimalFormat.toLocalizedPattern() can cause OOME

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: None
    • Component/s: core-libs
    • None

      The somewhat nonsensical snippet of code

          new DecimalFormat("").toLocalizedPattern()

      will allocate memory continuously until OutOfMemoryError is thrown.

      It seems like the empty string is an invalid pattern, so it should throw IAE.

            Assignee:
            Naoto Sato
            Reporter:
            Stuart Marks
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: