Dhairya-007 opened a new pull request, #30067:
URL: https://github.com/apache/camel/pull/30067
## Problem
22 of the component's header `javaType` values name a class by its simple
name, so the catalog publishes a type the reader cannot resolve:
```java
@Metadata(label = "consumer", description = "Archive status of file.",
javaType = "ArchiveStatus")
public static final String ARCHIVE_STATUS = HEADER_PREFIX + "ArchiveStatus";
```
```json
"CamelAzureStorageDataLakeArchiveStatus": { ..., "javaType":
"ArchiveStatus", ... }
```
Fully qualified is the convention by a wide margin - across the whole
catalog, 3692 header `javaType` values are fully qualified or a built-in type,
and 151 are not. `azure-storage-datalake` holds the largest single share of
those 151.
It matters most where the simple name is genuinely ambiguous. `Duration` is
`java.time.Duration`, not Azure's; `HttpHeaders` is
`com.azure.core.http.HttpHeaders`, not the datalake `PathHttpHeaders` next to
it; `Consumer<FileQueryError>` is `java.util.function.Consumer`, which in this
module is also the simple name of `org.apache.camel.Consumer`.
One of the 22 names a class that does not exist at all:
```java
javaType = "ListPathOptions")
public static final String LIST_PATH_OPTIONS = HEADER_PREFIX +
"ListPathOptions";
```
There is no `ListPathOptions` in the Azure SDK. The class the component
reads that header as is `ListPathsOptions`:
```java
public static ListPathsOptions getListPathsOptionsFromHeaders(final Exchange
exchange) {
return getObjectFromHeaders(exchange,
DataLakeConstants.LIST_PATH_OPTIONS, ListPathsOptions.class);
```
## Fix
Qualify all 22, taking each FQN from the import the module itself uses, and
correct `ListPathOptions` to
`com.azure.storage.file.datalake.models.ListPathsOptions`. The header *name*
`CamelAzureStorageDataLakeListPathOptions` is untouched - only the documented
type changes.
`Set<...>` keeps its bare `Set`, matching the `Map<...>` and `List<...>`
spelling used elsewhere in the catalog; the type argument is qualified.
Metadata only - no behaviour change. I diffed the regenerated catalog file
against `main` and confirmed the 22 `javaType` values are the only fields that
differ, with no header added or removed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]