Skip to content

Commit fe65bf4

Browse files
committed
defensively copy tags in OrchestrationState
1 parent 203d86d commit fe65bf4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

client/src/main/java/com/microsoft/durabletask/history/OrchestrationState.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import javax.annotation.Nullable;
99
import java.time.Instant;
1010
import java.util.Collections;
11+
import java.util.HashMap;
1112
import java.util.Map;
1213

1314
/**
@@ -83,7 +84,7 @@ public OrchestrationState(
8384
this.failureDetails = failureDetails;
8485
this.executionId = executionId;
8586
this.parentInstanceId = parentInstanceId;
86-
this.tags = tags == null ? null : Collections.unmodifiableMap(tags);
87+
this.tags = tags == null ? null : Collections.unmodifiableMap(new HashMap<>(tags));
8788
}
8889

8990
/** @return the orchestration instance ID. */

0 commit comments

Comments
 (0)