Apache Lucene open-source search software
LUCENE-6518: classcache reaper needs exemption from thread leaks (J9)
Robert Muird9a4127a9d1f
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txtindex 1f741fa7cb8..bbd00d8da1e 100644--- a/lucene/CHANGES.txt+++ b/lucene/CHANGES.txt@@ -71,6 +71,11 @@ Changes in Runtime Behaviorstructure 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 Featuresdiff --git a/lucene/test-framework/src/java/org/apache/lucene/util/QuickPatchThreadsFilter.java b/lucene/test-framework/src/java/org/apache/lucene/util/QuickPatchThreadsFilter.javaindex f2924c2ecb6..8b78ff0caa7 100644--- a/lucene/test-framework/src/java/org/apache/lucene/util/QuickPatchThreadsFilter.java+++ b/lucene/test-framework/src/java/org/apache/lucene/util/QuickPatchThreadsFilter.java@@ -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");}@Overridepublic boolean reject(Thread t) {if (isJ9) {+ // LUCENE-6518+ if ("ClassCache Reaper".equals(t.getName())) {+ return true;+ }++ // LUCENE-4736StackTraceElement [] 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;