This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 514ef4e  Remove noop pool shutdown code
514ef4e is described below

commit 514ef4e7063a507b7e23cfd26f19a70dc3284ba6
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 f80bd1e..355dea3 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

Reply via email to