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

Currency method to stream available Currencies

XMLWordPrintable

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

      java.util.Currency.getAvailableCurrencies() returns a Set of available currencies. While producing a Stream from a Set is simple enough for users, the method makes a defensive copy on the internal set.

      Providing a dedicated method such as availableCurrencies() gets rid of the need to perform a intermediate defensive copy operation, as the internal set is streamed directly.

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

              Created:
              Updated:
              Resolved: