From 857b96b2d3ec547fe2a4bc707ed6eb97bcabd2f8 Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Mon, 18 Sep 2023 20:31:03 +0000 Subject: [PATCH] Test without scratchpad: Do not fail reading data for integrationtests 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 --- .../src/test/java/org/apache/poi/stress/StressMap.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poi-integration/src/test/java/org/apache/poi/stress/StressMap.java b/poi-integration/src/test/java/org/apache/poi/stress/StressMap.java index 12c6afe21f..31bc78dbb4 100644 --- a/poi-integration/src/test/java/org/apache/poi/stress/StressMap.java +++ b/poi-integration/src/test/java/org/apache/poi/stress/StressMap.java @@ -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; -- 2.39.5