You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2020/05/10 18:06:30 UTC

[logging-log4j2] branch master updated: LOG4J2-2824 - Fix NullPointerException in ThreadContextDataInjector

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

rgoers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/master by this push:
     new 648486f  LOG4J2-2824 - Fix NullPointerException in ThreadContextDataInjector
648486f is described below

commit 648486fde6f9edaf789573548331420e35255510
Author: Ralph Goers <rg...@apache.org>
AuthorDate: Sun May 10 11:06:13 2020 -0700

    LOG4J2-2824 - Fix NullPointerException in ThreadContextDataInjector
---
 .../apache/logging/log4j/core/impl/ThreadContextDataInjector.java  | 2 +-
 src/changes/changes.xml                                            | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThreadContextDataInjector.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThreadContextDataInjector.java
index 0522eca..5ce7819 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThreadContextDataInjector.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThreadContextDataInjector.java
@@ -208,7 +208,7 @@ public class ThreadContextDataInjector {
                 // this will replace the LogEvent's context data with the returned instance
                 return providers.get(0).supplyStringMap();
             }
-            int count = props.size();
+            int count = props == null ? 0 : props.size();
             StringMap[] maps = new StringMap[providers.size()];
             for (int i = 0; i < providers.size(); ++i) {
                 maps[i] = providers.get(i).supplyStringMap();
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index bad5986..1465280 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -168,7 +168,12 @@
         Update Apache Flume from 1.8.0 to 1.9.0.
       </action>
     </release>
-    <release version="2.13.2" date="2020-MM-DD" description="GA Release 2.13.2">
+    <release version="2.13.3" date="2020-05-10" description="GA Release 2.13.3">
+      <action issue="LOG4J2-2838" dev="rgoers" type="fix">
+        Fix NullPointerException in ThreadContextDataInjector.
+      </action>
+    </release>
+    <release version="2.13.2" date="2020-04-23" description="GA Release 2.13.2">
       <action issue="LOG4J2-2824" dev="rgoers" type="fix" due-to="CrazyBills">
         Implement requiresLocation in GelfLayout to reflect whether location information is used in the message Pattern.
       </action>