Work on failing tests
This commit is contained in:
parent
bf8f26bc5f
commit
8ec1c1a011
|
@ -339,7 +339,7 @@ public abstract class BaseClient implements IRestfulClient {
|
||||||
IClientResponseHandlerHandlesBinary<T> handlesBinary = (IClientResponseHandlerHandlesBinary<T>) binding;
|
IClientResponseHandlerHandlesBinary<T> handlesBinary = (IClientResponseHandlerHandlesBinary<T>) binding;
|
||||||
if (handlesBinary.isBinary()) {
|
if (handlesBinary.isBinary()) {
|
||||||
try (InputStream reader = response.readEntity()) {
|
try (InputStream reader = response.readEntity()) {
|
||||||
return handlesBinary.invokeClient(mimeType, reader, response.getStatus(), headers);
|
return handlesBinary.invokeClientForBinary(mimeType, reader, response.getStatus(), headers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,6 @@ public interface IClientResponseHandlerHandlesBinary<T> extends IClientResponseH
|
||||||
*/
|
*/
|
||||||
boolean isBinary();
|
boolean isBinary();
|
||||||
|
|
||||||
T invokeClient(String theResponseMimeType, InputStream theResponseReader, int theResponseStatusCode, Map<String, List<String>> theHeaders) throws IOException, BaseServerResponseException;
|
T invokeClientForBinary(String theResponseMimeType, InputStream theResponseReader, int theResponseStatusCode, Map<String, List<String>> theHeaders) throws IOException, BaseServerResponseException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ public class ReadMethodBinding extends BaseResourceReturningMethodBinding implem
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object invokeClient(String theResponseMimeType, InputStream theResponseReader, int theResponseStatusCode, Map<String, List<String>> theHeaders)
|
public Object invokeClientForBinary(String theResponseMimeType, InputStream theResponseReader, int theResponseStatusCode, Map<String, List<String>> theHeaders)
|
||||||
throws IOException, BaseServerResponseException {
|
throws IOException, BaseServerResponseException {
|
||||||
byte[] contents = IOUtils.toByteArray(theResponseReader);
|
byte[] contents = IOUtils.toByteArray(theResponseReader);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue