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

markt-asf pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/11.0.x by this push:
     new 56c4e2a75f Review "Release the log handlers of the given class loader 
in JULI"
56c4e2a75f is described below

commit 56c4e2a75f95a488c97a2d5516cd04c47355bc2e
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Nov 6 16:01:22 2026 +0000

    Review "Release the log handlers of the given class loader in JULI"
    
    Enforce the non-null class loader requirement
---
 java/org/apache/juli/logging/LogFactory.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/java/org/apache/juli/logging/LogFactory.java 
b/java/org/apache/juli/logging/LogFactory.java
index a299195374..9faa435abd 100644
--- a/java/org/apache/juli/logging/LogFactory.java
+++ b/java/org/apache/juli/logging/LogFactory.java
@@ -24,6 +24,7 @@ import java.nio.file.FileSystems;
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.Iterator;
+import java.util.Objects;
 import java.util.ServiceConfigurationError;
 import java.util.ServiceLoader;
 import java.util.logging.LogManager;
@@ -257,6 +258,7 @@ public class LogFactory {
      * @param classLoader ClassLoader for which to release the LogFactory. 
Must not be null.
      */
     public static void release(ClassLoader classLoader) {
+        Objects.requireNonNull(classLoader);
         // JULI's log manager looks at the current classLoader so the
         // classLoader to release has to be the current one, the default
         // implementation does not so calling reset in that case would reset


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to