Andrea Cosentino created CAMEL-26583:
----------------------------------------
Summary: camel-azure-storage-datalake - apply ranges to streaming
downloads
Key: CAMEL-26583
URL: https://issues.apache.org/jira/browse/CAMEL-26583
Project: Camel
Issue Type: Bug
Components: camel-azure
Reporter: Andrea Cosentino
Same file, line 76:
```java
if (outputStream == null) {
InputStream fileInputStream = fileClientWrapper.openInputStream();
return new DataLakeOperationResponse(fileInputStream);
```
The normal InputStream response path returns before getFileRange(exchange) at
line 81. Thus the FileRange header and endpoint fileOffset/dataCount are
ignored; only the OutputStream-body path applies them. The wrapper at
client/DataLakeFileClientWrapper.java:65 delegates to the no-options SDK call.
Pass the resolved range into the SDK input-stream options and cover both
response paths.
History: longstanding branch from the original component; recent Data Lake
fixes did not address it. Existing testGetFile checks an unrestricted stream.
[Microsoft API
reference](https://learn.microsoft.com/en-us/java/api/com.azure.storage.file.datalake.datalakefileclient?view=azure-java-stable)
provides an openInputStream overload for range options.
Expected behavior: the operation honors its documented contract, including
exceptional and terminal paths. Add regression tests for the triggering case
described above.
Audited against upstream main 3658e02a7f9d. AI-generated by Codex on behalf of
oscerd (JIRA acosentino).
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)