diff --git a/linkis-commons/linkis-storage/src/main/java/org/apache/linkis/storage/excel/StorageExcelWriter.java b/linkis-commons/linkis-storage/src/main/java/org/apache/linkis/storage/excel/StorageExcelWriter.java index 05e1b68deb..6b2a98c72b 100644 --- a/linkis-commons/linkis-storage/src/main/java/org/apache/linkis/storage/excel/StorageExcelWriter.java +++ b/linkis-commons/linkis-storage/src/main/java/org/apache/linkis/storage/excel/StorageExcelWriter.java @@ -51,9 +51,9 @@ public class StorageExcelWriter extends ExcelFsWriter { protected DataType[] types; protected int rowPoint; protected int columnCounter; - protected Map styles; - private boolean isFlush; - private ByteArrayOutputStream os; + protected Map styles = new HashMap<>(); + private boolean isFlush = true; + private ByteArrayOutputStream os = new ByteArrayOutputStream(); private ByteArrayInputStream is; public StorageExcelWriter(