This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-threads.git
commit e046d2f36dd1727448571c590285c3156552edb4 Author: Robert Munteanu <[email protected]> AuthorDate: Thu Jan 25 15:34:42 2018 +0200 SLING-7432 - Thread pool clean up code can lead to infinite loops in ThreadLocal.get Propagate exceptions that occur in beforeExecute, so that the fallback thread pool implementation is used. --- .../commons/threads/impl/ThreadPoolExecutorCleaningThreadLocals.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/sling/commons/threads/impl/ThreadPoolExecutorCleaningThreadLocals.java b/src/main/java/org/apache/sling/commons/threads/impl/ThreadPoolExecutorCleaningThreadLocals.java index 8f7a9a6..ca1fd3b 100644 --- a/src/main/java/org/apache/sling/commons/threads/impl/ThreadPoolExecutorCleaningThreadLocals.java +++ b/src/main/java/org/apache/sling/commons/threads/impl/ThreadPoolExecutorCleaningThreadLocals.java @@ -57,8 +57,9 @@ public class ThreadPoolExecutorCleaningThreadLocals extends ThreadPoolExecutor { try { ThreadLocalCleaner cleaner = new ThreadLocalCleaner(listener); cleaners.put(t, cleaner); - } catch (Throwable e) { + } catch (RuntimeException | Error e) { LOGGER.warn("Could not set up thread local cleaner (most probably not a compliant JRE): {}", e, e); + throw e; } super.beforeExecute(t, r); -- To stop receiving notification emails like this one, please contact [email protected].
