From: PJ Fanning Date: Tue, 1 Feb 2022 21:42:38 +0000 (+0000) Subject: sonar issues X-Git-Tag: REL_5_2_1~124 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=53f0d6e33eab91b0a2ff8413a962e6b298de4fd4;p=poi.git sonar issues git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1897676 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/FractionFormat.java b/poi/src/main/java/org/apache/poi/ss/usermodel/FractionFormat.java index 0fb2576880..3e528f986a 100644 --- a/poi/src/main/java/org/apache/poi/ss/usermodel/FractionFormat.java +++ b/poi/src/main/java/org/apache/poi/ss/usermodel/FractionFormat.java @@ -107,7 +107,7 @@ public class FractionFormat extends Format { @SuppressWarnings("squid:S2111") public String format(Number num) { - final BigDecimal doubleValue = BigDecimal.valueOf(num.doubleValue()); + final BigDecimal doubleValue = new BigDecimal(num.doubleValue()); final boolean isNeg = doubleValue.compareTo(BigDecimal.ZERO) < 0;