This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push: new bbe29a8 Remove noop pool shutdown code bbe29a8 is described below commit bbe29a8c2d36b869996f2504032d666c49185362 Author: remm <r...@apache.org> AuthorDate: Fri Sep 18 12:41:38 2020 +0200 Remove noop pool shutdown code The utility executor shutdown is protected by a facade, so it just worked fine. --- .../org/apache/catalina/startup/ContextConfig.java | 26 +++++++++------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/java/org/apache/catalina/startup/ContextConfig.java b/java/org/apache/catalina/startup/ContextConfig.java index e0c1edd..f47a8bd 100644 --- a/java/org/apache/catalina/startup/ContextConfig.java +++ b/java/org/apache/catalina/startup/ContextConfig.java @@ -2211,24 +2211,18 @@ public class ContextConfig implements LifecycleListener { Map<String, JavaClassCacheEntry> javaClassCache) { Server s = getServer(); ExecutorService pool = null; + pool = s.getUtilityExecutor(); + List<Future<?>> futures = new ArrayList<>(fragments.size()); + for (WebXml fragment : fragments) { + Runnable task = new AnnotationScanTask(fragment, handlesTypesOnly, javaClassCache); + futures.add(pool.submit(task)); + } try { - pool = s.getUtilityExecutor(); - List<Future<?>> futures = new ArrayList<>(fragments.size()); - for (WebXml fragment : fragments) { - Runnable task = new AnnotationScanTask(fragment, handlesTypesOnly, javaClassCache); - futures.add(pool.submit(task)); - } - try { - for (Future<?> future : futures) { - future.get(); - } - } catch (Exception e) { - throw new RuntimeException(sm.getString("contextConfig.processAnnotationsInParallelFailure"), e); - } - } finally { - if (pool != null) { - pool.shutdownNow(); + for (Future<?> future : futures) { + future.get(); } + } catch (Exception e) { + throw new RuntimeException(sm.getString("contextConfig.processAnnotationsInParallelFailure"), e); } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org