From 53f0d6e33eab91b0a2ff8413a962e6b298de4fd4 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Tue, 1 Feb 2022 21:42:38 +0000 Subject: [PATCH] sonar issues git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1897676 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/poi/ss/usermodel/FractionFormat.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5