jsr354-api
jsr354-api copied to clipboard
JSR 354 - Money and Currency API
I had a look at the implementation of [AbstractContextBuilder.set(Class, T)](https://github.com/JavaMoney/jsr354-api/blob/master/src/main/java/javax/money/AbstractContextBuilder.java#L182) and I'm a bit confused: ```java public B set(Class key, T value) { B old = set(key.getName(), Objects.requireNonNull(value)); if (old...
Migrated from https://java.net/jira/browse/JAVAMONEY-163
Judging from the RI the contract of `MonetaryAmount#compareTo` seems to be to first compare by currency code (not by currency, even though `CurrencyUnit` is `Comparable`) before comparing by numeric value....
`javax.money.MonetaryAmount#stripTrailingZeros()` is confusing for two reasons: - It seems to be the only method left on `MonetaryAmount` that operates on the number value. `#getAmountWhole()` has been removed and `#getAmountFractionNumerator()` and...
I had a situation where I needed to implement my own MonetaryAmount (decorated Money) and now Im not able to integrate my code smooth with Money::with because theres a forced...
The README file mentions 1.0.1 only, newer releases should be mentioned there or in a separate file.
Migrated from https://java.net/jira/browse/JAVAMONEY-153
All three divide methods on `MonetaryAmount` ([MonetaryAmount#divide(double)](https://javamoney.github.io/apidocs/javax/money/MonetaryAmount.html#divide-double-), [MonetaryAmount#divide(long)](https://javamoney.github.io/apidocs/javax/money/MonetaryAmount.html#divide-long-), [MonetaryAmount#divide(Number)](https://javamoney.github.io/apidocs/javax/money/MonetaryAmount.html#divide-java.lang.Number-)) currently require > Throws: > ArithmeticException - if the exact quotient does not have a terminating decimal expansion We have a...
The following code generates a query successfully `CurrencyQuery query = CurrencyQueryBuilder.of().setProviderName("ProviderClassName").setCurrencyCodes("CNH").build(); ` But when the appropriate CurrencyProvider imp is loaded and getCurrencies(CurrencyQuery) is invoked, the following code results into NPE....
Migrated from https://java.net/jira/browse/JAVAMONEY-154