This is an automated email from the ASF dual-hosted git repository.
olamy pushed a commit to branch surefire-3.5.x
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
The following commit(s) were added to refs/heads/surefire-3.5.x by this push:
new 2cd2ec974 fix: null guard for context map (#3269) (#3272)
2cd2ec974 is described below
commit 2cd2ec97414b86b952098181861196f385c5ed4e
Author: Olivier Lamy <[email protected]>
AuthorDate: Tue Feb 24 18:37:53 2026 +1000
fix: null guard for context map (#3269) (#3272)
Co-authored-by: Daniel Mohedano <[email protected]>
---
.../plugin/surefire/booterclient/output/ThreadedStreamConsumer.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/ThreadedStreamConsumer.java
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/ThreadedStreamConsumer.java
index 3dacb4091..21d00e684 100644
---
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/ThreadedStreamConsumer.java
+++
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/ThreadedStreamConsumer.java
@@ -82,7 +82,9 @@ public void run() {
// copy mdc context map from parent thread so that mvn
// tools that build in parallel can use it in there logging
// to make clear what module is producing the logs
- MDC.setContextMap(parentThreadsMdcContextMap);
+ if (parentThreadsMdcContextMap != null) {
+ MDC.setContextMap(parentThreadsMdcContextMap);
+ }
while (!stop.get() || !synchronizer.isEmptyQueue()) {
try {
Event item = synchronizer.awaitNext();