From ab3f5e47d131e866b3911dfee19920e680371267 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Tue, 24 Nov 2015 01:08:34 +0000 Subject: [PATCH] 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 --- src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java index 89b7b2d3d0..cc66fba926 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java @@ -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() + "."); -- 2.39.5