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

java.text.DigitList.getDouble() : Controversy between javadoc and code

    XMLWordPrintable

Details

    • b19

    Description

      There was the controversy spotted in the private class DigitList.

          /**
           * Utility routine to get the value of the digit list
           * If (count == 0) this throws a NumberFormatException, which
           * mimics Long.parseLong().
           */
          public final double getDouble() {
              if (count == 0) {
                  return 0.0;
              }

      The doc says the method throws, if count == 0, but the code does not.
      Need to check what is appropriate here and correct the other part.

      Attachments

        Issue Links

          Activity

            People

              jlu Justin Lu
              igerasim Ivan Gerasimov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: