Visitar URL original
fix: null guard for context map (#3269) · olamy/maven-surefire@2924192 · GitHub
Skip to content

Commit 2924192

Browse files
daniel-mohedanoolamy
authored andcommitted
fix: null guard for context map (apache#3269)
1 parent 857940e commit 2924192

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/ThreadedStreamConsumer.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ public void run() {
8282
// copy mdc context map from parent thread so that mvn
8383
// tools that build in parallel can use it in there logging
8484
// to make clear what module is producing the logs
85-
MDC.setContextMap(parentThreadsMdcContextMap);
85+
if (parentThreadsMdcContextMap != null) {
86+
MDC.setContextMap(parentThreadsMdcContextMap);
87+
}
8688
while (!stop.get() || !synchronizer.isEmptyQueue()) {
8789
try {
8890
Event item = synchronizer.awaitNext();

0 commit comments

Comments
 (0)