mirror of https://github.com/qos-ch/slf4j
minor edits, code formatting
This commit is contained in:
parent
fd5d546503
commit
18e6156c09
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,12 @@
|
|||
|
||||
<h3>, 2015 - Release of SLF4J 1.7.13</h3>
|
||||
|
||||
<p>Fixed issue with BasicMDCAdapter leaking MDC information to
|
||||
non-child threads. This problem was reported by Lukasz Cwik in <a
|
||||
href="http://jira.qos.ch/browse/SLF4J-316">SLF4J-316</a> who also
|
||||
provided the relavant pull request.
|
||||
</p>
|
||||
|
||||
<p>House cleaning of our project's Maven <em>pom.xml</em> files, an
|
||||
initiative undertaken by Jeremy Landis.
|
||||
</p>
|
||||
|
|
|
|||
Loading…
Reference in New Issue