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

Improve Currency.getInstance exception handling

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • 25
    • core-libs
    • None

      Currency.getInstance(String) can throw IllegalArgumentException with no context or message. Let's improve it. It should at least print the value of the string passed to the getInstance call.

      jshell> Currency c = Currency.getInstance("TEST")
      | Exception java.lang.IllegalArgumentException
      | at Currency.getInstance (Currency.java:321)
      | at Currency.getInstance (Currency.java:302)
      | at (#2:1)

            jlu Justin Lu
            coffeys Sean Coffey
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: