Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@
<version>1.19.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.5.2</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
10 changes: 5 additions & 5 deletions sdk/src/main/java/io/dapr/client/DaprClientHttpAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -331,19 +331,19 @@ public Mono<Void> unregisterActorTimer(String actorType, String actorId, String

/**
* Builds a StateKeyValue object based on the Response
* @param resonse The response of the HTTP Call
* @param response The response of the HTTP Call
* @param requestedKey The Key Requested.
* @param clazz The Class of the Value of the state
* @param <T> The Type of the Value of the state
* @return A StateKeyValue instance
* @throws IOException If there's a issue deserialzing the response.
*/
private <T> StateKeyValue<T> buildStateKeyValue(DaprHttp.Response resonse, String requestedKey, StateOptions stateOptions, Class<T> clazz) throws IOException {
T value = objectSerializer.deserialize(resonse.getBody(), clazz);
private <T> StateKeyValue<T> buildStateKeyValue(DaprHttp.Response response, String requestedKey, StateOptions stateOptions, Class<T> clazz) throws IOException {
T value = objectSerializer.deserialize(response.getBody(), clazz);
String key = requestedKey;
String etag = null;
if (resonse.getHeaders() != null && resonse.getHeaders().containsKey("Etag")) {
etag = objectSerializer.deserialize(resonse.getHeaders().get("Etag"), String.class);
if (response.getHeaders() != null && response.getHeaders().containsKey("Etag")) {
etag = objectSerializer.deserialize(response.getHeaders().get("Etag"), String.class);
}
return new StateKeyValue<>(value, key, etag, stateOptions);
}
Expand Down
Loading