]> source.dussan.org Git - poi.git/commitdiff
sonar issues
authorPJ Fanning <fanningpj@apache.org>
Thu, 25 Aug 2022 19:22:28 +0000 (19:22 +0000)
committerPJ Fanning <fanningpj@apache.org>
Thu, 25 Aug 2022 19:22:28 +0000 (19:22 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903688 13f79535-47bb-0310-9956-ffa450edef68

poi/src/main/java/org/apache/poi/ss/format/CellDateFormatter.java

index f408450b48424520fec711f70e66a708d3d372bc..24a95b023f0ccc4c51f2f0c4cc094bb2355778b1 100644 (file)
@@ -44,7 +44,7 @@ public class CellDateFormatter extends CellFormatter {
 
     private static final int NUM_MILLISECONDS_IN_DAY = 1000 * 60 * 60 * 24;
 
-    private static /* final */ volatile CellDateFormatter SIMPLE_DATE;
+    private static CellDateFormatter SIMPLE_DATE_FORMATTER;
 
     class DatePartHandler implements CellFormatPart.PartHandler {
         private int mStart = -1;
@@ -242,12 +242,12 @@ public class CellDateFormatter extends CellFormatter {
      */
     @Override
     public void simpleValue(StringBuffer toAppendTo, Object value) {
-        CellDateFormatter cellDateFormatter = SIMPLE_DATE;
+        CellDateFormatter cellDateFormatter = SIMPLE_DATE_FORMATTER;
         if (cellDateFormatter == null) {
             synchronized (CellDateFormatter.class) {
-                cellDateFormatter = SIMPLE_DATE;
+                cellDateFormatter = SIMPLE_DATE_FORMATTER;
                 if (cellDateFormatter == null) {
-                    SIMPLE_DATE = cellDateFormatter = new CellDateFormatter("mm/d/y");
+                    SIMPLE_DATE_FORMATTER = cellDateFormatter = new CellDateFormatter("mm/d/y");
                 }
             }
         }