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

markt-asf 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 29db5f310d Review "Release the log handlers of the given class loader 
in JULI"
29db5f310d is described below

commit 29db5f310d3aa13b13b1630c4a240ad5ae1938d7
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 37a3fc4009..757a1b694c 100644
--- a/java/org/apache/juli/logging/LogFactory.java
+++ b/java/org/apache/juli/logging/LogFactory.java
@@ -18,6 +18,7 @@ package org.apache.juli.logging;
 
 import java.lang.reflect.Constructor;
 import java.nio.file.FileSystems;
+import java.util.Objects;
 import java.util.ServiceLoader;
 import java.util.logging.LogManager;
 
@@ -198,6 +199,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