From: Andreas Beeker Date: Sun, 17 Jan 2021 21:20:05 +0000 (+0000) Subject: Integration tests - try to fix Oracle/OpenJDK vs IBM-JDK error message differences... X-Git-Tag: REL_5_1_0~416 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8f2c722fd3818abeaef2aeb72a8e58b29a8dca08;p=poi.git Integration tests - try to fix Oracle/OpenJDK vs IBM-JDK error message differences on XXE files git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885625 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/integrationtest/org/apache/poi/stress/TestAllFiles.java b/src/integrationtest/org/apache/poi/stress/TestAllFiles.java index 0849f9d989..81c31d3a21 100644 --- a/src/integrationtest/org/apache/poi/stress/TestAllFiles.java +++ b/src/integrationtest/org/apache/poi/stress/TestAllFiles.java @@ -176,11 +176,11 @@ public class TestAllFiles { // with Java 16+ NullPointerExceptions may contain a message ... but apparently not always ?! assertTrue(jreVersion >= 16 || actMsg == null, errPrefix); if (actMsg != null) { - assertTrue(actMsg.startsWith(exMessage), errPrefix + "Message: "+actMsg+" - didn't start with "+exMessage); + assertTrue(actMsg.contains(exMessage), errPrefix + "Message: "+actMsg+" - didn't contain: "+exMessage); } } else { assertNotNull(actMsg, errPrefix); - assertTrue(actMsg.startsWith(exMessage), errPrefix + "Message: "+actMsg+" - didn't start with "+exMessage); + assertTrue(actMsg.contains(exMessage), errPrefix + "Message: "+actMsg+" - didn't contain: "+exMessage); } } else { assertDoesNotThrow(exec, errPrefix); diff --git a/test-data/spreadsheet/stress.xls b/test-data/spreadsheet/stress.xls index 8ebb9f39e7..3d286e5e55 100644 Binary files a/test-data/spreadsheet/stress.xls and b/test-data/spreadsheet/stress.xls differ