poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From one...@apache.org
Subject svn commit: r1717929 - /poi/trunk/src/java/org/apache/poi/ss/usermodel/ExcelStyleDateFormatter.java
Date Fri, 04 Dec 2015 10:51:04 GMT
Author: onealj
Date: Fri Dec  4 10:51:03 2015
New Revision: 1717929

URL: http://svn.apache.org/viewvc?rev=1717929&view=rev
Log:
make fields static

Modified:
    poi/trunk/src/java/org/apache/poi/ss/usermodel/ExcelStyleDateFormatter.java

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/ExcelStyleDateFormatter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/ExcelStyleDateFormatter.java?rev=1717929&r1=1717928&r2=1717929&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/ExcelStyleDateFormatter.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/ExcelStyleDateFormatter.java Fri Dec  4
10:51:03 2015
@@ -43,13 +43,13 @@ public class ExcelStyleDateFormatter ext
     public static final char L_BRACKET_SYMBOL = '\ue016';
     public static final char LL_BRACKET_SYMBOL = '\ue017';
 
-    private final DecimalFormat format1digit;
-    private final DecimalFormat format2digits;
+    private static final DecimalFormat format1digit;
+    private static final DecimalFormat format2digits;
 
-    private final DecimalFormat format3digit;
-    private final DecimalFormat format4digits;
+    private static final DecimalFormat format3digit;
+    private static final DecimalFormat format4digits;
 
-    {
+    static {
         DecimalFormatSymbols dfs = DecimalFormatSymbols.getInstance(Locale.ROOT);
         format1digit = new DecimalFormat("0", dfs);
         format2digits = new DecimalFormat("00", dfs);
@@ -59,6 +59,9 @@ public class ExcelStyleDateFormatter ext
         DataFormatter.setExcelStyleRoundingMode(format2digits, RoundingMode.DOWN);
         DataFormatter.setExcelStyleRoundingMode(format3digit);
         DataFormatter.setExcelStyleRoundingMode(format4digits);
+    }
+    
+    {
         setTimeZone(LocaleUtil.getUserTimeZone());
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message