Author: kiwiwings
Date: Sat Jan 16 09:55:42 2021
New Revision: 1885549
URL: http://svn.apache.org/viewvc?rev=1885549&view=rev
Log:
integration tests: NullPointerExceptions contain now a description in Java 16+
Modified:
poi/trunk/src/integrationtest/org/apache/poi/stress/TestAllFiles.java
poi/trunk/test-data/spreadsheet/stress.xls
Modified: poi/trunk/src/integrationtest/org/apache/poi/stress/TestAllFiles.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/integrationtest/org/apache/poi/stress/TestAllFiles.java?rev=1885549&r1=1885548&r2=1885549&view=diff
==============================================================================
--- poi/trunk/src/integrationtest/org/apache/poi/stress/TestAllFiles.java
(original)
+++ poi/trunk/src/integrationtest/org/apache/poi/stress/TestAllFiles.java Sat
Jan 16 09:55:42 2021
@@ -88,7 +88,15 @@ import org.opentest4j.AssertionFailedErr
@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<? extends Exception>)exClass,
exec);
String actMsg = e.getMessage();
- if (exMessage == null) {
+ if ((NullPointerException.class.isAssignableFrom(exClass) &&
jreVersion < 16) || exMessage == null) {
assertNull(actMsg);
} else {
assertNotNull(actMsg);
Modified: poi/trunk/test-data/spreadsheet/stress.xls
URL:
http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/stress.xls?rev=1885549&r1=1885548&r2=1885549&view=diff
==============================================================================
Binary files - no diff available.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]