diff --git a/src/integrationtest/org/apache/poi/stress/TestAllFiles.java b/src/integrationtest/org/apache/poi/stress/TestAllFiles.java index 9bce94f0db..347559330f 100644 --- a/src/integrationtest/org/apache/poi/stress/TestAllFiles.java +++ b/src/integrationtest/org/apache/poi/stress/TestAllFiles.java @@ -88,7 +88,15 @@ import org.opentest4j.AssertionFailedError; @Execution(ExecutionMode.CONCURRENT) public class TestAllFiles { private static final File ROOT_DIR = new File("test-data"); + private static final int jreVersion; + static { + String version = System.getProperty("java.version"); + String major = version.startsWith("1.") + ? version.substring(2, 3) + : version.substring(0, version.indexOf(".")); + jreVersion = Integer.parseInt(major); + } public static final String[] SCAN_EXCLUDES = { "**/.svn/**", @@ -204,7 +212,7 @@ public class TestAllFiles { } else if (exClass != null) { Exception e = assertThrows((Class)exClass, exec); String actMsg = e.getMessage(); - if (exMessage == null) { + if ((NullPointerException.class.isAssignableFrom(exClass) && jreVersion < 16) || exMessage == null) { assertNull(actMsg); } else { assertNotNull(actMsg); diff --git a/test-data/spreadsheet/stress.xls b/test-data/spreadsheet/stress.xls index 004069cffe..065ad65564 100644 Binary files a/test-data/spreadsheet/stress.xls and b/test-data/spreadsheet/stress.xls differ