I have identified an misbehavior when using moneta with UK instead GB. Even UK bring a valid country on java locale it fails when used to retrieve the currency code.
public static void main(String[] args) {
var locale = new Locale("en", "UK");
var currency = Monetary.getCurrency(locale);
}
results in:
Exception in thread "main" javax.money.MonetaryException: No currency unit found for locale: en_UK
at javax.money.spi.MonetaryCurrenciesSingletonSpi.getCurrency(MonetaryCurrenciesSingletonSpi.java:97)
at javax.money.Monetary.getCurrency(Monetary.java:401)
Shouldn't moneta returns GBP for both gb and uk?
PS:. I didn't find any issue opened or closed related to this
I have identified an misbehavior when using moneta with UK instead GB. Even
UK
bring a valid country on java locale it fails when used to retrieve the currency code.results in:
Shouldn't moneta returns
GBP
for bothgb
anduk
?PS:. I didn't find any issue opened or closed related to this