tests: get JRE bug workaround working for this test again

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1306931 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2012-03-29 15:43:03 +00:00
parent b5f8deb795
commit e49b69d459
1 changed files with 5 additions and 1 deletions

View File

@ -162,9 +162,13 @@ public class PatternAnalyzerTest extends BaseTokenStreamTestCase {
} }
static boolean isJREBug7104012(Throwable t) { static boolean isJREBug7104012(Throwable t) {
if (!(t instanceof ArrayIndexOutOfBoundsException)) {
// BaseTokenStreamTestCase now wraps exc in a new RuntimeException:
t = t.getCause();
if (!(t instanceof ArrayIndexOutOfBoundsException)) { if (!(t instanceof ArrayIndexOutOfBoundsException)) {
return false; return false;
} }
}
StackTraceElement trace[] = t.getStackTrace(); StackTraceElement trace[] = t.getStackTrace();
for (StackTraceElement st : trace) { for (StackTraceElement st : trace) {
if ("java.text.RuleBasedBreakIterator".equals(st.getClassName()) if ("java.text.RuleBasedBreakIterator".equals(st.getClassName())