Source:
<code>public void downloadPart(DataChannel channel, Part part, String objectId, File outputDir) throws IOException { retry.execute(new RetryCallback<Void, IOException>() { @Override public Void doWithRetry(RetryContext ctx) throws IOException { log.debug("Download Part URL: {}", part.getUrl()); final RequestCallback callback = new RequestCallback() { @Override public void doWithRequest(final ClientHttpRequest request) throws IOException { request.getHeaders().set(HttpHeaders.RANGE, Parts.getHttpRangeValue(part)); } }; final ResponseExtractor<HttpHeaders> headersExtractor = new ResponseExtractor<HttpHeaders>() { @Override public HttpHeaders extractData(ClientHttpResponse response) throws IOException { try (HashingInputStream his = new HashingInputStream(Hashing.md5(), response.getBody())) { channel.readFrom(his); response.getHeaders().set(HttpHeaders.ETAG, his.hash().toString()); return response.getHeaders(); } } }; try { HttpHeaders headers = dataTemplate.execute(new URI(part.getUrl()), HttpMethod.GET, callback, headersExtractor); part.setMd5(cleanUpETag(headers.getETag())); downloadStateStore.commit(outputDir, objectId, part); } catch (NotResumableException | NotRetryableException e) { log.error("Cannot proceed. Failed to receive part for part number: {}", part.getPartNumber(), e); throw e; } catch (Throwable e) { <START> log.warn("Failed to receive part for part number: {}. Retrying.", part.getPartNumber(), e); <END> channel.reset(); throw new RetryableException(e); } return null; } }); }</code><technical_language>I e here</technical_language>

Target:
public void downloadPart(DataChannel channel, Part part, String objectId, File outputDir) throws IOException { retry.execute(new RetryCallback<Void, IOException>() { @Override public Void doWithRetry(RetryContext ctx) throws IOException { log.debug("Download Part URL: {}", part.getUrl()); final RequestCallback callback = new RequestCallback() { @Override public void doWithRequest(final ClientHttpRequest request) throws IOException { request.getHeaders().set(HttpHeaders.RANGE, Parts.getHttpRangeValue(part)); } }; final ResponseExtractor<HttpHeaders> headersExtractor = new ResponseExtractor<HttpHeaders>() { @Override public HttpHeaders extractData(ClientHttpResponse response) throws IOException { try (HashingInputStream his = new HashingInputStream(Hashing.md5(), response.getBody())) { channel.readFrom(his); response.getHeaders().set(HttpHeaders.ETAG, his.hash().toString()); return response.getHeaders(); } } }; try { log.debug("performing GET {}", part.getUrl()); HttpHeaders headers = dataTemplate.execute(new URI(part.getUrl()), HttpMethod.GET, callback, headersExtractor); part.setMd5(cleanUpETag(headers.getETag())); downloadStateStore.commit(outputDir, objectId, part); log.debug("committed part# to download state store", objectId, part.getPartNumber()); } catch (NotResumableException | NotRetryableException e) { log.error("Cannot proceed. Failed to receive part for part# : {}", part.getPartNumber(), e); throw e; } catch (Throwable e) { log.warn("Failed to receive part for part number: {}. Retrying. {}", part.getPartNumber(), e); channel.reset(); throw new RetryableException(e); } return null; } }); }