Skip to content

Commit

Permalink
reverting old changes
Browse files Browse the repository at this point in the history
  • Loading branch information
l-trotta committed Oct 8, 2024
1 parent d003cc6 commit 5bcf666
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -375,21 +375,20 @@ private <ResponseT> ResponseT decodeTransportResponse(

if (endpoint instanceof JsonEndpoint) {

// Expecting a body
if (entity == null) {
throw new TransportException(
clientResp,
"Expecting a response body, but none was sent",
endpoint.id()
);
}

@SuppressWarnings("unchecked")
JsonEndpoint<?, ResponseT, ?> jsonEndpoint = (JsonEndpoint<?, ResponseT, ?>) endpoint;
// Successful response
ResponseT response = null;
JsonpDeserializer<ResponseT> responseParser = jsonEndpoint.responseDeserializer();
if (responseParser != null) {
// Expecting a body
if (entity == null) {
throw new TransportException(
clientResp,
"Expecting a response body, but none was sent",
endpoint.id()
);
}
checkJsonContentType(entity.contentType(), clientResp, endpoint);
try (
JsonParser parser = mapper.jsonProvider().createParser(entity.asInputStream())
Expand Down

0 comments on commit 5bcf666

Please sign in to comment.