JavaMoney / jsr354-ri

JSR 354 - Moneta: Reference Implementation
Other
344 stars 101 forks source link

Use negateExact in FastMoney.negate #221

Closed marschall closed 6 years ago

marschall commented 6 years ago

java.lang.Math offers a negateExact method for negating, there is no need to use Math.multiplyExact -1 to achieve the same.

Also the negate and abs tests are missing a fail in case the methods do not throw a ArithmeticException.


This change is Reviewable

marschall commented 6 years ago

This should also fix #189