mirror of https://github.com/dapr/java-sdk.git
Use default state serializer content type if state is not null (#1033)
Signed-off-by: Antonio Sanchez <antonio.maria.sanchez@gmail.com> Co-authored-by: Cassie Coyle <cassie@diagrid.io>
This commit is contained in:
parent
a0ee8d1199
commit
3dadc0be06
|
@ -493,7 +493,11 @@ abstract class AbstractDaprClient implements DaprClient, DaprPreviewClient {
|
|||
*/
|
||||
@Override
|
||||
public Mono<Void> saveState(String storeName, String key, String etag, Object value, StateOptions options) {
|
||||
State<?> state = new State<>(key, value, etag, options);
|
||||
Map<String, String> meta = null;
|
||||
if (value != null) {
|
||||
meta = Collections.singletonMap("contentType", stateSerializer.getContentType());
|
||||
}
|
||||
State<?> state = new State<>(key, value, etag, meta, options);
|
||||
return this.saveBulkState(storeName, Collections.singletonList(state));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue