Skip to content

Commit 3cc7514

Browse files
committed
Ensure null values work
1 parent ead5da3 commit 3cc7514

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sentry/src/main/java/io/sentry/Baggage.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,11 @@ public void setReplayId(final @Nullable String replayId) {
457457
@ApiStatus.Internal
458458
public void set(final @NotNull String key, final @Nullable String value) {
459459
if (mutable) {
460-
this.keyValues.put(key, value);
460+
if (value == null) {
461+
keyValues.remove(key);
462+
} else {
463+
keyValues.put(key, value);
464+
}
461465
}
462466
}
463467

0 commit comments

Comments
 (0)