Skip to content

Commit a2bd311

Browse files
committed
refactor: rename FastExcel to Fesod in class names
- Rename FastExcelConstants to FesodConstants - Rename FastExcelTempFileCreationStrategy to FesodTempFileCreationStrategy - Update all references across the codebase
1 parent 507577f commit a2bd311

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

fesod-sheet/src/main/java/org/apache/fesod/sheet/analysis/v03/handlers/FormulaRecordHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import lombok.extern.slf4j.Slf4j;
2525
import org.apache.fesod.sheet.analysis.v03.IgnorableXlsRecordHandler;
2626
import org.apache.fesod.sheet.constant.BuiltinFormats;
27-
import org.apache.fesod.sheet.constant.FastExcelConstants;
27+
import org.apache.fesod.sheet.constant.FesodSheetConstants;
2828
import org.apache.fesod.sheet.context.xls.XlsReadContext;
2929
import org.apache.fesod.sheet.enums.CellDataTypeEnum;
3030
import org.apache.fesod.sheet.enums.RowTypeEnum;
@@ -74,7 +74,7 @@ public void processRecord(XlsReadContext xlsReadContext, Record record) {
7474
tempCellData.setType(CellDataTypeEnum.NUMBER);
7575
tempCellData.setOriginalNumberValue(BigDecimal.valueOf(frec.getValue()));
7676
tempCellData.setNumberValue(
77-
tempCellData.getOriginalNumberValue().round(FastExcelConstants.EXCEL_MATH_CONTEXT));
77+
tempCellData.getOriginalNumberValue().round(FesodSheetConstants.EXCEL_MATH_CONTEXT));
7878
int dataFormat = xlsReadContext
7979
.xlsReadWorkbookHolder()
8080
.getFormatTrackingHSSFListener()

fesod-sheet/src/main/java/org/apache/fesod/sheet/analysis/v07/handlers/CellTagHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
import java.math.BigDecimal;
2323
import org.apache.fesod.sheet.constant.ExcelXmlConstants;
24-
import org.apache.fesod.sheet.constant.FastExcelConstants;
24+
import org.apache.fesod.sheet.constant.FesodSheetConstants;
2525
import org.apache.fesod.sheet.context.xlsx.XlsxReadContext;
2626
import org.apache.fesod.sheet.enums.CellDataTypeEnum;
2727
import org.apache.fesod.sheet.metadata.GlobalConfiguration;
@@ -109,7 +109,7 @@ public void endElement(XlsxReadContext xlsxReadContext, String name) {
109109
tempCellData.setType(CellDataTypeEnum.NUMBER);
110110
tempCellData.setOriginalNumberValue(new BigDecimal(tempDataString));
111111
tempCellData.setNumberValue(
112-
tempCellData.getOriginalNumberValue().round(FastExcelConstants.EXCEL_MATH_CONTEXT));
112+
tempCellData.getOriginalNumberValue().round(FesodSheetConstants.EXCEL_MATH_CONTEXT));
113113
break;
114114
default:
115115
throw new IllegalStateException("Cannot set values now");

fesod-sheet/src/main/java/org/apache/fesod/sheet/constant/FastExcelConstants.java renamed to fesod-sheet/src/main/java/org/apache/fesod/sheet/constant/FesodSheetConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*
2828
*
2929
*/
30-
public class FastExcelConstants {
30+
public class FesodSheetConstants {
3131

3232
/**
3333
* Excel by default with 15 to store Numbers, and the double in Java can use to store number 17, led to the accuracy

fesod-sheet/src/main/java/org/apache/fesod/sheet/metadata/data/ReadCellData.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import lombok.Getter;
2525
import lombok.NoArgsConstructor;
2626
import lombok.Setter;
27-
import org.apache.fesod.sheet.constant.FastExcelConstants;
27+
import org.apache.fesod.sheet.constant.FesodSheetConstants;
2828
import org.apache.fesod.sheet.enums.CellDataTypeEnum;
2929

3030
/**
@@ -154,7 +154,7 @@ public static ReadCellData<?> newInstanceOriginal(BigDecimal numberValue, Intege
154154
cellData.setRowIndex(rowIndex);
155155
cellData.setColumnIndex(columnIndex);
156156
cellData.setOriginalNumberValue(numberValue);
157-
cellData.setNumberValue(numberValue.round(FastExcelConstants.EXCEL_MATH_CONTEXT));
157+
cellData.setNumberValue(numberValue.round(FesodSheetConstants.EXCEL_MATH_CONTEXT));
158158
return cellData;
159159
}
160160

fesod-sheet/src/main/java/org/apache/fesod/sheet/util/FastExcelTempFileCreationStrategy.java renamed to fesod-sheet/src/main/java/org/apache/fesod/sheet/util/FesodTempFileCreationStrategy.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
*
3939
*
4040
*/
41-
public class FastExcelTempFileCreationStrategy implements TempFileCreationStrategy {
41+
public class FesodTempFileCreationStrategy implements TempFileCreationStrategy {
4242
/**
4343
* Name of POI files directory in temporary directory.
4444
*/
@@ -64,7 +64,7 @@ public class FastExcelTempFileCreationStrategy implements TempFileCreationStrate
6464
*
6565
* @see File#createTempFile(String, String)
6666
*/
67-
public FastExcelTempFileCreationStrategy() {
67+
public FesodTempFileCreationStrategy() {
6868
this(null);
6969
}
7070

@@ -75,13 +75,13 @@ public FastExcelTempFileCreationStrategy() {
7575
* directory).
7676
* @see Files#createTempFile(Path, String, String, FileAttribute[])
7777
*/
78-
public FastExcelTempFileCreationStrategy(File dir) {
78+
public FesodTempFileCreationStrategy(File dir) {
7979
this.dir = dir;
8080
}
8181

8282
private void createPOIFilesDirectory() throws IOException {
8383
// Create our temp dir only once by double-checked locking
84-
// The directory is not deleted, even if it was created by this TempFileCreationStrategy
84+
// The directory is not deleted, even if it was created by this FesodTempFileCreationStrategy
8585
if (dir == null || !dir.exists()) {
8686
dirLock.lock();
8787
try {

fesod-sheet/src/main/java/org/apache/fesod/sheet/util/FileUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public static void writeToFile(File file, InputStream inputStream, boolean close
157157
}
158158

159159
public static void createPoiFilesDirectory() {
160-
TempFile.setTempFileCreationStrategy(new FastExcelTempFileCreationStrategy());
160+
TempFile.setTempFileCreationStrategy(new FesodTempFileCreationStrategy());
161161
}
162162

163163
public static File createCacheTmpFile() {

0 commit comments

Comments
 (0)