Ensure baggage can always be added to

Otherwise it could be assigned to a Collections.emptyMap()
Fixes https://github.com/DataDog/dd-trace-java/issues/1036
This commit is contained in:
Will Tran 2019-10-09 13:01:44 -04:00 committed by GitHub
parent 5fecfa3617
commit 63c6db0cd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ public class DDSpanContext implements io.opentracing.SpanContext {
if (baggageItems == null) {
this.baggageItems = new ConcurrentHashMap<>(0);
} else {
this.baggageItems = baggageItems;
this.baggageItems = new ConcurrentHashMap<>(baggageItems);
}
if (tags != null) {