We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8816b27 + 473e056 commit 779a202Copy full SHA for 779a202
src/main/java/javax/money/spi/MonetaryCurrenciesSingletonSpi.java
@@ -169,7 +169,7 @@ default Set<CurrencyUnit> getCurrencies(String... providers) {
169
default CurrencyUnit getCurrency(CurrencyQuery query) {
170
Set<CurrencyUnit> currencies = getCurrencies(query);
171
if (currencies.isEmpty()) {
172
- return null;
+ throw new MonetaryException("CurrencyUnit not found: " + query);
173
}
174
if (currencies.size() == 1) {
175
return currencies.iterator().next();
0 commit comments