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

DecimalFormat.toLocalizedPattern() can cause OOME

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • None
    • 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.

            naoto Naoto Sato
            smarks Stuart Marks
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: