You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ce...@apache.org on 2023/09/18 20:31:03 UTC

svn commit: r1912407 - /poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/StressMap.java

Author: centic
Date: Mon Sep 18 20:31:03 2023
New Revision: 1912407

URL: http://svn.apache.org/viewvc?rev=1912407&view=rev
Log:
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

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

Modified: poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/StressMap.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/StressMap.java?rev=1912407&r1=1912406&r2=1912407&view=diff
==============================================================================
--- poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/StressMap.java (original)
+++ poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/StressMap.java Mon Sep 18 20:31:03 2023
@@ -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;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org