jsr354-api icon indicating copy to clipboard operation
jsr354-api copied to clipboard

CurrencyProviderSpi.getCurrencies should specify first criteria wins

Open marschall opened this issue 6 years ago • 0 comments

CurrencyQuery allows to specify several criteria eg. currency codes and countries eg. "USD" and "es_EC" However javax.money.spi.CurrencyProviderSpi#getCurrencies(CurrencyQuery) does not specify what happens when multiple criteria are set. JDKCurrencyProvider currently behaves like this:

  1. If a currency code is specified search by currency code, otherwise
  2. If a country is specified search by country, otherwise
  3. If a numeric code is specified search by numeric code, otherwise
  4. return everything

marschall avatar Jul 19 '19 15:07 marschall