Skip to content

Commit

Permalink
minor edits, code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ceki committed Nov 6, 2015
1 parent fd5d546 commit 18e6156
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Expand Up @@ -38,7 +38,8 @@
*
* @author Ceki Gulcu
* @author Maarten Bosteels
*
* @author Lukasz Cwik
*
* @since 1.5.0
*/
public class BasicMDCAdapter implements MDCAdapter {
Expand Down
Expand Up @@ -74,7 +74,6 @@ public void testGetCopyOfContextMapFromMDC() {
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"));
Expand All @@ -85,7 +84,6 @@ public void run() {
public void testMDCDoesntGetValuesFromChildThread() throws Exception {
mdc.put("parentKey", "parentValue");
runAndWait(new Runnable() {
@Override
public void run() {
mdc.put("childKey", "childValue");
}
Expand All @@ -97,7 +95,6 @@ public void run() {
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");
Expand All @@ -123,7 +120,6 @@ private void runAndWait(Runnable runnable) throws Exception {
/** 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;
}
Expand Down
6 changes: 6 additions & 0 deletions slf4j-site/src/site/pages/news.html
Expand Up @@ -31,6 +31,12 @@ <h1>SLF4J News</h1>

<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>
Expand Down

0 comments on commit 18e6156

Please sign in to comment.