diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/PatternAnalyzerTest.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/PatternAnalyzerTest.java index 3b1b2296f3a..fbef3205df3 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/PatternAnalyzerTest.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/PatternAnalyzerTest.java @@ -163,7 +163,11 @@ public class PatternAnalyzerTest extends BaseTokenStreamTestCase { static boolean isJREBug7104012(Throwable t) { if (!(t instanceof ArrayIndexOutOfBoundsException)) { - return false; + // BaseTokenStreamTestCase now wraps exc in a new RuntimeException: + t = t.getCause(); + if (!(t instanceof ArrayIndexOutOfBoundsException)) { + return false; + } } StackTraceElement trace[] = t.getStackTrace(); for (StackTraceElement st : trace) {