9
触发场景描述 excelWriter.fill 调用触发空指针异常 版本3.0.1
触发Bug的代码 StyleUtil类192行
Caused by: java.lang.NullPointerException: null
at com.alibaba.excel.util.StyleUtil.createFont(StyleUtil.java:192)
at com.alibaba.excel.util.StyleUtil.buildFont(StyleUtil.java:144)
at com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder.createFont(WriteWorkbookHolder.java:304)
at com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder.createCellStyle(WriteWorkbookHolder.java:286)
at com.alibaba.excel.write.handler.impl.FillStyleCellWriteHandler.afterCellDispose(FillStyleCellWriteHandler.java:45)
at com.alibaba.excel.util.WriteHandlerUtils.afterCellDispose(WriteHandlerUtils.java:193)
at com.alibaba.excel.util.WriteHandlerUtils.afterCellDispose(WriteHandlerUtils.java:174)
at com.alibaba.excel.write.executor.ExcelWriteFillExecutor.doFill(ExcelWriteFillExecutor.java:216)
at com.alibaba.excel.write.executor.ExcelWriteFillExecutor.fill(ExcelWriteFillExecutor.java:119)
at com.alibaba.excel.write.ExcelBuilderImpl.fill(ExcelBuilderImpl.java:82)
at com.alibaba.excel.ExcelWriter.fill(ExcelWriter.java:110)
at com.alibaba.excel.ExcelWriter.fill(ExcelWriter.java:98)
提示的异常或者没有达到的效果 本地进行修改后,NPE问题消失。