LUCENE-6518: classcache reaper needs exemption from thread leaks (J9)

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1683451 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2015-06-04 03:15:22 +00:00
parent e4e41cfd8b
commit d9a4127a9d
2 changed files with 13 additions and 2 deletions

View File

@ -71,6 +71,11 @@ Changes in Runtime Behavior
structure of composite and leaf readers. (Adrien Grand,
Uwe Schindler)
Build
* LUCENE-6518: Don't report false thread leaks from IBM J9
ClassCache Reaper in test framework. (Dawid Weiss)
======================= Lucene 5.2.0 =======================
New Features

View File

@ -26,15 +26,21 @@ public class QuickPatchThreadsFilter implements ThreadFilter {
static final boolean isJ9;
static {
isJ9 = System.getProperty("java.vm.info", "<?>").contains("IBM J9");
isJ9 = Constants.JAVA_VENDOR.startsWith("IBM");
}
@Override
public boolean reject(Thread t) {
if (isJ9) {
// LUCENE-6518
if ("ClassCache Reaper".equals(t.getName())) {
return true;
}
// LUCENE-4736
StackTraceElement [] stack = t.getStackTrace();
if (stack.length > 0 && stack[stack.length - 1].getClassName().equals("java.util.Timer$TimerImpl")) {
return true; // LUCENE-4736
return true;
}
}
return false;