From 18e6156c09bb6da8e9d8bcfa36ae2491e9361814 Mon Sep 17 00:00:00 2001 From: Ceki Gulcu Date: Fri, 6 Nov 2015 13:10:07 +0100 Subject: [PATCH] minor edits, code formatting --- .../src/main/java/org/slf4j/helpers/BasicMDCAdapter.java | 3 ++- .../test/java/org/slf4j/helpers/BasicMDCAdapterTest.java | 4 ---- slf4j-site/src/site/pages/news.html | 6 ++++++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/slf4j-api/src/main/java/org/slf4j/helpers/BasicMDCAdapter.java b/slf4j-api/src/main/java/org/slf4j/helpers/BasicMDCAdapter.java index a5fe45fe..ebad7c4a 100644 --- a/slf4j-api/src/main/java/org/slf4j/helpers/BasicMDCAdapter.java +++ b/slf4j-api/src/main/java/org/slf4j/helpers/BasicMDCAdapter.java @@ -38,7 +38,8 @@ import java.util.Map; * * @author Ceki Gulcu * @author Maarten Bosteels - * + * @author Lukasz Cwik + * * @since 1.5.0 */ public class BasicMDCAdapter implements MDCAdapter { diff --git a/slf4j-api/src/test/java/org/slf4j/helpers/BasicMDCAdapterTest.java b/slf4j-api/src/test/java/org/slf4j/helpers/BasicMDCAdapterTest.java index 39adef92..91c49b40 100644 --- a/slf4j-api/src/test/java/org/slf4j/helpers/BasicMDCAdapterTest.java +++ b/slf4j-api/src/test/java/org/slf4j/helpers/BasicMDCAdapterTest.java @@ -74,7 +74,6 @@ public class BasicMDCAdapterTest extends TestCase { public void testMDCInheritsValuesFromParentThread() throws Exception { mdc.put("parentKey", "parentValue"); runAndWait(new Runnable() { - @Override public void run() { mdc.put("childKey", "childValue"); assertEquals("parentValue", mdc.get("parentKey")); @@ -85,7 +84,6 @@ public class BasicMDCAdapterTest extends TestCase { public void testMDCDoesntGetValuesFromChildThread() throws Exception { mdc.put("parentKey", "parentValue"); runAndWait(new Runnable() { - @Override public void run() { mdc.put("childKey", "childValue"); } @@ -97,7 +95,6 @@ public class BasicMDCAdapterTest extends TestCase { public void testMDCChildThreadCanOverwriteParentThread() throws Exception { mdc.put("sharedKey", "parentValue"); runAndWait(new Runnable() { - @Override public void run() { assertEquals("parentValue", mdc.get("sharedKey")); mdc.put("sharedKey", "childValue"); @@ -123,7 +120,6 @@ public class BasicMDCAdapterTest extends TestCase { /** A {@link UncaughtExceptionHandler} that records whether the thread threw an exception. */ private static class RecordingExceptionHandler implements UncaughtExceptionHandler { private Throwable exception; - @Override public void uncaughtException(Thread t, Throwable e) { exception = e; } diff --git a/slf4j-site/src/site/pages/news.html b/slf4j-site/src/site/pages/news.html index dadba9cf..f2f00b35 100755 --- a/slf4j-site/src/site/pages/news.html +++ b/slf4j-site/src/site/pages/news.html @@ -31,6 +31,12 @@

, 2015 - Release of SLF4J 1.7.13

+

Fixed issue with BasicMDCAdapter leaking MDC information to + non-child threads. This problem was reported by Lukasz Cwik in SLF4J-316 who also + provided the relavant pull request. +

+

House cleaning of our project's Maven pom.xml files, an initiative undertaken by Jeremy Landis.