]> source.dussan.org Git - poi.git/commitdiff
broken test
authorPJ Fanning <fanningpj@apache.org>
Sun, 3 Oct 2021 10:45:08 +0000 (10:45 +0000)
committerPJ Fanning <fanningpj@apache.org>
Sun, 3 Oct 2021 10:45:08 +0000 (10:45 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1893849 13f79535-47bb-0310-9956-ffa450edef68

poi/src/main/java/org/apache/poi/ss/usermodel/FractionFormat.java

index 8f082a0db100061cd6221401b8b20296fa6e0103..af02fa954a9d3627f17c183ae6f31bb7176b8199 100644 (file)
@@ -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;
 
@@ -155,7 +155,7 @@ public class FractionFormat extends Format {
 
         //now format the results
         if (isNeg){
-            sb.append("-");
+            sb.append('-');
         }
 
         //if whole part has to go into the numerator