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

Disallow null prefix and suffix in DecimalFormat

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • 25
    • core-libs
    • None
    • b13
    • generic
    • generic

      Code such as new `DecimalFormat().setPositivePrefix(null)` is allowed. These prefix and suffix setters should disallow `null` as input as all it does is creates an illegal state. Otherwise, almost any DecimalFormat operation will throw NPE when trying to process the prefix/suffix.

            jlu Justin Lu
            jlu Justin Lu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: