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

BigDecimal should populate NumberFormatException message

    XMLWordPrintable

Details

    • b45
    • x86_64
    • windows_7
    • Not verified

    Backports

      Description

        A DESCRIPTION OF THE REQUEST :
        Some of BigDecimal's constructors, notably "BigDecimal(char[] in, int offset, int len, MathContext mc)" throw NumberFormatException with an empty message. The exception message should indicate what String could not be parsed (and, if possible, why).

        JUSTIFICATION :
        Including the invalid String in the exception would help developers debug parsing problems quicker when the input string is dynamically constructed, for example when parsing data off a website.


        Attachments

          Issue Links

            Activity

              People

                bpb Brian Burkhalter
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: