diff --git a/src/main/java/com/alibaba/excel/metadata/csv/CsvDataFormat.java b/src/main/java/com/alibaba/excel/metadata/csv/CsvDataFormat.java index 42d3f043..9efc7321 100644 --- a/src/main/java/com/alibaba/excel/metadata/csv/CsvDataFormat.java +++ b/src/main/java/com/alibaba/excel/metadata/csv/CsvDataFormat.java @@ -45,10 +45,11 @@ public class CsvDataFormat implements DataFormat { if (index != null) { return index; } - index = (short)(formatList.size() + BuiltinFormats.MIN_CUSTOM_DATA_FORMAT_INDEX); + short indexPrimitive = (short)(formatList.size() + BuiltinFormats.MIN_CUSTOM_DATA_FORMAT_INDEX); + index = indexPrimitive; formatList.add(format); formatMap.put(format, index); - return index; + return indexPrimitive; } @Override