修复Money中金额分配的问题bug(issue#IC9Y35@Gitee)

This commit is contained in:
Looly 2025-05-23 21:41:18 +08:00
parent 95ee9a0cb5
commit 5f5ead1129
2 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@
* 【core 】 修复`NumberUtil`isNumber方法以L结尾没有小数点判断问题issue#3938@Github
* 【core 】 修复`CharsequenceUtil`toLowerCase方法拼写错误issue#3941@Github
* 【core 】 修复`UUID`equals的问题改为final类issue#3948@Github
* 【core 】 修复`Money`中金额分配的问题bugissue#IC9Y35@Gitee
-------------------------------------------------------------------------------------------------------------
# 5.8.38(2025-05-13)

View File

@ -726,7 +726,7 @@ public class Money implements Serializable, Comparable<Money> {
Money lowResult = newMoneyWithSameCurrency(cent / targets);
Money highResult = newMoneyWithSameCurrency(lowResult.cent + 1);
int remainder = (int) cent % targets;
int remainder = (int) (cent % targets);
for (int i = 0; i < remainder; i++) {
results[i] = highResult;