Browse Source

modify if-statement to satisfy pmd check

developing
lethal233 4 years ago
parent
commit
e1bc4743f3
  1. 5
      src/main/java/com/alibaba/excel/write/property/ExcelWriteHeadProperty.java

5
src/main/java/com/alibaba/excel/write/property/ExcelWriteHeadProperty.java

@ -158,9 +158,8 @@ public class ExcelWriteHeadProperty extends ExcelHeadProperty {
int lastCol = i;
int lastRow = j;
for (int k = i + 1; k < headList.size(); k++) {
if (headList.get(k).getHeadNameList().get(j).equals(headName)
&& (j - 1 >= 0)
&& !headList.get(k).getHeadNameList().get(j-1).equals(headName)) {
boolean flag = (j - 1 >= 0) && !headList.get(k).getHeadNameList().get(j - 1).equals(headName);
if (headList.get(k).getHeadNameList().get(j).equals(headName) && flag) {
alreadyRangeSet.add(k + "-" + j);
lastCol = k;
} else {

Loading…
Cancel
Save