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/12/16 12:09:02 UTC
svn commit: r1914708 - in /poi/trunk: poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java test-data/spreadsheet/stress.xls
Author: centic
Date: Sat Dec 16 12:09:02 2023
New Revision: 1914708
URL: http://svn.apache.org/viewvc?rev=1914708&view=rev
Log:
Allow all IndexOutOfBoundsException to have either empty message or some message
Newer JDKs add a more useful exception message, so we need to be a bit more
lenient for these in integration tests
Modified:
poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java
poi/trunk/test-data/spreadsheet/stress.xls
Modified: poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java?rev=1914708&r1=1914707&r2=1914708&view=diff
==============================================================================
--- poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java (original)
+++ poi/trunk/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java Sat Dec 16 12:09:02 2023
@@ -287,9 +287,10 @@ public class TestAllFiles {
errPrefix + " for " + exClass + " expected message '" + exMessage + "' but had '" + actMsg + "': " + e);
if (actMsg != null &&
- // sometimes ArrayIndexOutOfBoundsException has null-message?!?
+ // in newer JDK versions IndexOutOfBoundsException switch from empty message
+ // to more useful content
// so skip the check for this type of exception if expected message is null
- (exMessage != null || !ArrayIndexOutOfBoundsException.class.isAssignableFrom(exClass))) {
+ (exMessage != null || !IndexOutOfBoundsException.class.isAssignableFrom(exClass))) {
assertNotNull(exMessage,
errPrefix + "Expected message was null, but actMsg wasn't: Message: " + actMsg + ": " + e);
assertTrue(actMsg.contains(exMessage),
Modified: poi/trunk/test-data/spreadsheet/stress.xls
URL: http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/stress.xls?rev=1914708&r1=1914707&r2=1914708&view=diff
==============================================================================
Binary files - no diff available.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org