Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
(Java) V4 4.7.1
-
None
-
None
Description
When using the OData v4 Client to perform Batch requests with chunked transfer encoding disabled, obtaining the payloadManager() BatchManager causes a block that waits the thread indefinitely on a PipedInputStream.
ODataClient client = ... client.getOdataClient().getConfiguration().setUseChuncked( false ); ODataBatchRequest br = client.getBatchRequestFactory().getBatchRequest( <baseUrl> ); //Thread waits indefinitely here, and the BatchManager is required to addRequest to the Batch BatchManager bm = br.payloadManager();
The code locks on this IOUtils call because the input argument is a PipedInputStream:
called from by:
I believe the problem could be fixed if chunking disabled would cause the URIUtils.shouldUseRepeatableHttpBodyEntry function to return true, thus the IOUtils.copy would not be executed until the Future of AbstractODataStreamedRequest is satisfied.