文档对比空指针bug

This commit is contained in:
CD
2022-10-25 14:07:54 +08:00
parent 7aeaa58063
commit 7978d74b75
@@ -393,7 +393,9 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
cell.setCellStyle(cellStyle); cell.setCellStyle(cellStyle);
} }
} }
i = i + leftSplit.length; int left_length = ObjectUtils.isEmpty(leftSplit) ? 0 : leftSplit.length;
int right_length = ObjectUtils.isEmpty(rightSplit) ? 0 : rightSplit.length;
i = left_length > right_length ? i + left_length : i + right_length;
} }
if (includeComments || StringUtils.isEmpty(selectIds)) { if (includeComments || StringUtils.isEmpty(selectIds)) {
Row row = sheet.createRow(i); Row row = sheet.createRow(i);