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

DecimalFormat::toPattern throws OutOfMemoryError when pattern is empty string

XMLWordPrintable

    • b14

      Observed that
      jshell> import java.text.*;

      jshell> new DecimalFormat("", new DecimalFormatSymbols()).toString()
      | Exception java.lang.OutOfMemoryError: Java heap space
      | at Arrays.copyOf (Arrays.java:3540)
      | at AbstractStringBuilder.ensureCapacityInternal (AbstractStringBuilder.java:245)
      | at AbstractStringBuilder.append (AbstractStringBuilder.java:813)
      | at StringBuilder.append (StringBuilder.java:246)
      | at DecimalFormat.toPattern (DecimalFormat.java:3317)
      | at DecimalFormat.toPattern (DecimalFormat.java:3030)
      | at DecimalFormat.toString (DecimalFormat.java:3019)
      | at (#2:1)


      During CSR JDK-8323088 validations

        There are no Sub-Tasks for this issue.

            jlu Justin Lu
            kganapureddy Krushnareddy Ganapureddy
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: