This is an automated email from the ASF dual-hosted git repository.
olamy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
The following commit(s) were added to refs/heads/master by this push:
new a948c0951 fix: null guard for context map (#3269)
a948c0951 is described below
commit a948c095172048935477cd69c04bfad32ff45973
Author: Daniel Mohedano <[email protected]>
AuthorDate: Tue Feb 24 01:23:43 2026 +0100
fix: null guard for context map (#3269)
---
.../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();