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

[Fmt-Nu] NumberFormat should specify the return type better

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 6
    • core-libs
    • None
    • x86
    • windows_xp

      NumberFormat provides a number of methods to get a NumberFormat back. For example, you can use getCurrencyInstance to get one back for currency. None of these methods indicate what objects you'll get back when you invoke parseObject. This is made even more confusing by the fact that the return type may vary. For example, currency instance appears to return Long if passed in something like '$1.00' but double if passed in '$1.01'. This is unexpected and should most definitely be documented.

            jlu Justin Lu
            svioletsunw Scott Violet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: