Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

tests: get JRE bug workaround working for this test again

Michael McCandlesse49b69d4595f
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) {