![]() |
|
|
|
|
Issue Type:
|
Improvement
|
|
Affects Versions:
|
1.0.13 |
|
Assignee:
|
Logback dev list
|
|
Created:
|
03/Feb/14 11:22 AM
|
|
Description:
|
When using MDC and thread pools, code usually follows this pattern:
But if no MDC variables are set, getCopyOfContextMap() returns null and setContextMap then blows up. LogbackMDCAdapter.setContextMap uses Map.putAll which doesn't accept null. Therefore, one has to wrap the call to setContextMap in an annoying null check.
I suggest that setContextMap should handle a null argument gracefully by returning early. Alternatively, return Collections.emptyMap() or similar from getCopyOfContextMap.
|
|
Project:
|
logback
|
|
Priority:
|
Minor
|
|
Reporter:
|
Thomas Kappler
|
|
|
|
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
_______________________________________________
logback-dev mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-dev