You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IMO the current number value used as round factor does not honor any MathContext/capabilities of the target amount:
In spi.AbstractCurrencyConversion:
protected NumberValue roundFactor(MonetaryAmount amount, NumberValue factor) should optionally round the factor to be used. By default this method will only round
as much as it is needed, so the factor can be handled by the target amount instance based on its
numeric capabilities. Rounding is applied only if amount.getContext().getMaxScale() > 0 as follows:
If the amount provides a MathContext as context property this is used.
If the amount provides a RoundingMode, this is used (default is RoundingMode.HALF_EVEN).
By default the scale used is scale of the conversion factor. If the acmount allows a higher scale based on amount.getContext().getMaxScale(), this higher scale is used.
Please leave your comments, if this should create any problems. You may also test the changes done with the latest master version of the repo.
The text was updated successfully, but these errors were encountered:
IMO the current number value used as round factor does not honor any MathContext/capabilities of the target amount:
In
spi.AbstractCurrencyConversion
:protected NumberValue roundFactor(MonetaryAmount amount, NumberValue factor)
should optionally round the factor to be used. By default this method will only roundamount.getContext().getMaxScale() > 0
as follows:MathContext
as context property this is used.RoundingMode
, this is used (default isRoundingMode.HALF_EVEN
).amount.getContext().getMaxScale()
, this higher scale is used.Please leave your comments, if this should create any problems. You may also test the changes done with the latest master version of the repo.
The text was updated successfully, but these errors were encountered: