Browse Source

remove duplicate null check of srcStartRow (identified by FindBugs)

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1716003 13f79535-47bb-0310-9956-ffa450edef68
tags/REL_3_14_BETA1
Javen O'Neal 8 years ago
parent
commit
ab3f5e47d1
1 changed files with 2 additions and 3 deletions
  1. 2
    3
      src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java

+ 2
- 3
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java View File

@@ -2699,9 +2699,8 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
for (int index=1; index < srcRows.size(); index++) {
final Row prevRow = srcRows.get(index-1);
final Row curRow = srcRows.get(index);
if (prevRow == null || curRow == null) {
throw new IllegalArgumentException("srcRows may not contain null rows. Found null row at index " +
index + " after Row " + prevRow.getRowNum() + ".");
if (curRow == null) {
throw new IllegalArgumentException("srcRows may not contain null rows. Found null row at index " + index + ".");
//} else if (curRow.getRowNum() != prevRow.getRowNum() + 1) {
// throw new IllegalArgumentException("srcRows must contain continuously increasing row numbers. " +
// "Got srcRows[" + (index-1) + "]=Row " + prevRow.getRowNum() + ", srcRows[" + index + "]=Row " + curRow.getRowNum() + ".");

Loading…
Cancel
Save