Skip to content

Commit d3ce35f

Browse files
google-genai-botcopybara-github
authored andcommitted
feat: update Session.state() and its builder to be of general Map types
PiperOrigin-RevId: 881416590
1 parent 0d1e5c7 commit d3ce35f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

core/src/main/java/com/google/adk/sessions/Session.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
import java.util.ArrayList;
2828
import java.util.Collections;
2929
import java.util.List;
30+
import java.util.Map;
3031
import java.util.concurrent.ConcurrentHashMap;
31-
import java.util.concurrent.ConcurrentMap;
3232

3333
/** A {@link Session} object that encapsulates the {@link State} and {@link Event}s of a session. */
3434
@JsonDeserialize(builder = Session.Builder.class)
@@ -101,7 +101,7 @@ public Builder state(State state) {
101101

102102
@CanIgnoreReturnValue
103103
@JsonProperty("state")
104-
public Builder state(ConcurrentMap<String, Object> state) {
104+
public Builder state(Map<String, Object> state) {
105105
this.state = new State(state);
106106
return this;
107107
}
@@ -162,7 +162,7 @@ public String id() {
162162
}
163163

164164
@JsonProperty("state")
165-
public ConcurrentMap<String, Object> state() {
165+
public Map<String, Object> state() {
166166
return state;
167167
}
168168

0 commit comments

Comments
 (0)