oscerd opened a new pull request, #23411:
URL: https://github.com/apache/camel/pull/23411
## Summary
Renames the Exchange header string values in `DnsConstants` from the legacy
dotted-lowercase names to the project-wide `Camel<Component><Field>`
convention
used across the rest of the component catalog:
| Constant | Previous value | New value |
|---|---|---|
| `DnsConstants.DNS_CLASS` | `dns.class` | `CamelDnsClass` |
| `DnsConstants.DNS_NAME` | `dns.name` | `CamelDnsName` |
| `DnsConstants.DNS_DOMAIN` | `dns.domain` | `CamelDnsDomain` |
| `DnsConstants.DNS_SERVER` | `dns.server` | `CamelDnsServer` |
| `DnsConstants.DNS_TYPE` | `dns.type` | `CamelDnsType` |
| `DnsConstants.TERM` | `term` | `CamelDnsTerm` |
The Java field names (`DNS_CLASS`, `DNS_NAME`, `DNS_DOMAIN`, `DNS_SERVER`,
`DNS_TYPE`, `TERM`) are **unchanged**, so routes and code that reference the
constants symbolically (`setHeader(DnsConstants.DNS_SERVER, ...)`) continue
to
work without changes. Routes that set the headers by their literal string
value
(`setHeader("dns.server", ...)`, `setHeader("term", ...)`) must be updated to
the new value.
Consistent with the same alignment applied in CAMEL-23506, CAMEL-23515,
CAMEL-23516, CAMEL-23522, CAMEL-23526 and CAMEL-23532.
## Changes
- `DnsConstants.java`: header string values renamed (Java field names
unchanged).
- `DnsComponent.java` / `DnsWikipediaProducer.java`: Javadoc references
updated.
- `dns-component.adoc`: documentation references updated. The stale `dns.dig`
documentation reference to `"dns.query"` (which never matched any real
header
read by `DnsDigProducer`) is updated to `CamelDnsName`, the actual header
consumed by the dig producer.
- 9 in-module tests that previously set headers by literal value now go
through
`DnsConstants` (e.g. `headers.put(DnsConstants.DNS_NAME, ...)`), matching
the
cleanup pattern used for the cxfrs/cxf tests in CAMEL-23526.
- `docs/.../camel-4x-upgrade-guide-4_21.adoc`: new `camel-dns` entry
mirroring
CAMEL-23526 / CAMEL-23532, including the cross-transport-propagation note
(Camel-prefixed values are filtered by transport `HeaderFilterStrategy` at
transport boundaries — bridge routes need to carry the parameters in a
non-Camel-prefixed application header and map them in the route).
- Regenerated artifacts: `components/camel-dns/.../dns.json`,
`catalog/.../components/dns.json`,
`dsl/.../DnsEndpointBuilderFactory.java`.
## Backport
The same defect/divergence exists on `camel-4.18.x` and `camel-4.14.x`
(identical
constants and producer reads). The Jira already carries
`fixVersions = 4.21.0 / 4.18.3 / 4.14.8`; backport commits + upgrade-guide
sync PRs to follow the CAMEL-23526 / CAMEL-23532 pattern.
## Test plan
- [x] `mvn test` in `components/camel-dns` — 22 tests, 0 failures (12
skipped =
pre-existing `@Disabled` integration tests that hit the public internet)
- [x] `mvn install` in `catalog/camel-catalog` — regenerated catalog/dns.json
- [x] `mvn install` in `dsl/camel-endpointdsl` — regenerated
`DnsEndpointBuilderFactory.java`
- [ ] Apache CI: full reactor build (the local environment hits an unrelated
JDK-21 schemagen issue in `core/camel-xml-io`; relying on CI as
authoritative)
---
_Claude Code on behalf of Andrea Cosentino_
--
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]