Sfoglia il codice sorgente

修复空指针的问题

4.1.3.A
Hulk 5 anni fa
parent
commit
1b0690805c
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. +4
    -1
      easypoi-base/src/main/java/cn/afterturn/easypoi/excel/export/base/BaseExportService.java

+ 4
- 1
easypoi-base/src/main/java/cn/afterturn/easypoi/excel/export/base/BaseExportService.java Vedi File

@@ -69,7 +69,10 @@ public abstract class BaseExportService extends ExportCommonService {
int maxHeight = 1, listMaxHeight = 1;
// 合并需要合并的单元格
int margeCellNum = cellNum;
int indexKey = createIndexCell(row, index, excelParams.get(0));
int indexKey = 0;
if (excelParams != null && !excelParams.isEmpty()){
indexKey = createIndexCell(row, index, excelParams.get(0));
}
cellNum += indexKey;
for (int k = indexKey, paramSize = excelParams.size(); k < paramSize; k++) {
entity = excelParams.get(k);


Caricamento…
Annulla
Salva