make fields static

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1717929 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Javen O'Neal 2015-12-04 10:51:03 +00:00
parent ebbf3d0ddb
commit 3b24eaacd3

View File

@ -43,13 +43,13 @@ public class ExcelStyleDateFormatter extends SimpleDateFormat {
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 extends SimpleDateFormat {
DataFormatter.setExcelStyleRoundingMode(format2digits, RoundingMode.DOWN);
DataFormatter.setExcelStyleRoundingMode(format3digit);
DataFormatter.setExcelStyleRoundingMode(format4digits);
}
{
setTimeZone(LocaleUtil.getUserTimeZone());
}