]> source.dussan.org Git - poi.git/commitdiff
Test without scratchpad: Do not fail reading data for integrationtests
authorDominik Stadler <centic@apache.org>
Mon, 18 Sep 2023 20:31:03 +0000 (20:31 +0000)
committerDominik Stadler <centic@apache.org>
Mon, 18 Sep 2023 20:31:03 +0000 (20:31 +0000)
It seems the XLS now has missing cells which cause an NPE
while checking for scratchpad-handlers

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1912407 13f79535-47bb-0310-9956-ffa450edef68

poi-integration/src/test/java/org/apache/poi/stress/StressMap.java

index 12c6afe21f485d917efb7c9785dd58cf5f47e2d3..31bc78dbb41c8202cd77ab7ea25c0699737d4168 100644 (file)
@@ -119,7 +119,7 @@ public class StressMap {
             Row row = iter.next();
 
             if (SCRATCH_IGNORE && handlerIdx > -1) {
-                String handler = row.getCell(handlerIdx).getStringCellValue();
+                String handler = row.getCell(handlerIdx) == null ? "" : row.getCell(handlerIdx).getStringCellValue();
                 if (SCRATCH_HANDLER.matcher(handler).find()) {
                     // ignore exception of ignored files
                     continue;