You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2022/01/19 00:42:38 UTC

[GitHub] [logging-log4j2] carterkozak commented on a change in pull request #717: LOG4J2-3333: Fix ThreadContextDataInjector classloader deadlock

carterkozak commented on a change in pull request #717:
URL: https://github.com/apache/logging-log4j2/pull/717#discussion_r787261885



##########
File path: log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThreadContextDataInjector.java
##########
@@ -62,21 +62,9 @@
     public static Collection<ContextDataProvider> contextDataProviders =
             new ConcurrentLinkedDeque<>();
 
-    private static volatile List<ContextDataProvider> serviceProviders = null;
-    private static final Lock providerLock = new ReentrantLock();
+    private static final List<ContextDataProvider> serviceProviders = getServiceProviders();

Review comment:
       Good call, I'll update the initializer such that the list itself is unmodifiable as well.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org