修复Convert.toBigDecimal对于浮点型数据精度损失风险

This commit is contained in:
chenjh3 2022-10-28 14:56:31 +08:00
parent bd0e574268
commit a50fe6415b
1 changed files with 1 additions and 1 deletions

View File

@ -713,7 +713,7 @@ public class Convert
} }
if (value instanceof Double) if (value instanceof Double)
{ {
return new BigDecimal((Double) value); return BigDecimal.valueOf((Double) value);
} }
if (value instanceof Integer) if (value instanceof Integer)
{ {