We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8bc6b12 commit 0d1e5c7Copy full SHA for 0d1e5c7
1 file changed
core/src/main/java/com/google/adk/events/EventActions.java
@@ -287,8 +287,14 @@ public Builder skipSummarization(boolean skipSummarization) {
287
288
@CanIgnoreReturnValue
289
@JsonProperty("stateDelta")
290
- public Builder stateDelta(ConcurrentMap<String, Object> value) {
291
- this.stateDelta = value;
+ public Builder stateDelta(@Nullable Map<String, Object> value) {
+ if (value == null) {
292
+ this.stateDelta = new ConcurrentHashMap<>();
293
+ } else if (value instanceof ConcurrentMap) {
294
+ this.stateDelta = (ConcurrentMap<String, Object>) value;
295
+ } else {
296
+ this.stateDelta = new ConcurrentHashMap<>(value);
297
+ }
298
return this;
299
}
300
0 commit comments