-
-
Notifications
You must be signed in to change notification settings - Fork 78
Description
All three divide methods on MonetaryAmount
(MonetaryAmount#divide(double), MonetaryAmount#divide(long), MonetaryAmount#divide(Number)) currently require
Throws:
ArithmeticException - if the exact quotient does not have a terminating decimal expansion
We have a MonetaryAmount
implementation that is based on a fraction that can handle numbers that do not have a terminating decimal expansion. Strictly the specification requires us to throw a ArithmeticException
even though we can handle the result.
If possible we would like to see this requirement removed. We believe the already existing requirement
Throws:
ArithmeticException - ... or if the result exceeds the numeric capabilities of this implementation class
Is enough to cause implementations that can not handle numbers that do not have a terminating decimal expansion to throw a ArithmeticException
.