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
This commit is contained in:
Andreas Beeker 2021-01-17 21:20:05 +00:00
parent f5f5fc462c
commit 8f2c722fd3
2 changed files with 2 additions and 2 deletions

View File

@ -176,11 +176,11 @@ public class TestAllFiles {
// with Java 16+ NullPointerExceptions may contain a message ... but apparently not always ?! // with Java 16+ NullPointerExceptions may contain a message ... but apparently not always ?!
assertTrue(jreVersion >= 16 || actMsg == null, errPrefix); assertTrue(jreVersion >= 16 || actMsg == null, errPrefix);
if (actMsg != null) { 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 { } else {
assertNotNull(actMsg, errPrefix); 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 { } else {
assertDoesNotThrow(exec, errPrefix); assertDoesNotThrow(exec, errPrefix);

Binary file not shown.