From 8ec1c1a011ed14b6b067f27ea0420fd0d9a1e8c2 Mon Sep 17 00:00:00 2001 From: jamesagnew Date: Mon, 19 Nov 2018 08:24:11 -0500 Subject: [PATCH] Work on failing tests --- .../src/main/java/ca/uhn/fhir/rest/client/impl/BaseClient.java | 2 +- .../rest/client/method/IClientResponseHandlerHandlesBinary.java | 2 +- .../java/ca/uhn/fhir/rest/client/method/ReadMethodBinding.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseClient.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseClient.java index 4a931cb5cc1..6473ea9a3fe 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseClient.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseClient.java @@ -339,7 +339,7 @@ public abstract class BaseClient implements IRestfulClient { IClientResponseHandlerHandlesBinary handlesBinary = (IClientResponseHandlerHandlesBinary) binding; if (handlesBinary.isBinary()) { try (InputStream reader = response.readEntity()) { - return handlesBinary.invokeClient(mimeType, reader, response.getStatus(), headers); + return handlesBinary.invokeClientForBinary(mimeType, reader, response.getStatus(), headers); } } } diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IClientResponseHandlerHandlesBinary.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IClientResponseHandlerHandlesBinary.java index ad16c57d11b..64a947b2a82 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IClientResponseHandlerHandlesBinary.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/IClientResponseHandlerHandlesBinary.java @@ -35,6 +35,6 @@ public interface IClientResponseHandlerHandlesBinary extends IClientResponseH */ boolean isBinary(); - T invokeClient(String theResponseMimeType, InputStream theResponseReader, int theResponseStatusCode, Map> theHeaders) throws IOException, BaseServerResponseException; + T invokeClientForBinary(String theResponseMimeType, InputStream theResponseReader, int theResponseStatusCode, Map> theHeaders) throws IOException, BaseServerResponseException; } diff --git a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ReadMethodBinding.java b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ReadMethodBinding.java index 536663c0294..24a7e163a7e 100644 --- a/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ReadMethodBinding.java +++ b/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/method/ReadMethodBinding.java @@ -106,7 +106,7 @@ public class ReadMethodBinding extends BaseResourceReturningMethodBinding implem } @Override - public Object invokeClient(String theResponseMimeType, InputStream theResponseReader, int theResponseStatusCode, Map> theHeaders) + public Object invokeClientForBinary(String theResponseMimeType, InputStream theResponseReader, int theResponseStatusCode, Map> theHeaders) throws IOException, BaseServerResponseException { byte[] contents = IOUtils.toByteArray(theResponseReader);