]> source.dussan.org Git - poi.git/commitdiff
remove duplicate null check of srcStartRow (identified by FindBugs)
authorJaven O'Neal <onealj@apache.org>
Tue, 24 Nov 2015 01:08:34 +0000 (01:08 +0000)
committerJaven O'Neal <onealj@apache.org>
Tue, 24 Nov 2015 01:08:34 +0000 (01:08 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1716003 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java

index 89b7b2d3d094f09b2b42d1d4526e2b8b232ac676..cc66fba926c1e1c24178727b3a4b22d0d337fd95 100644 (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() + ".");