[backport camel-4.14.x] CAMEL-23574: camel-dns - align Exchange header constant names with Camel naming convention#23482
Merged
Conversation
…r constant names with Camel naming convention Backport of apache#23411. Rename the Exchange header string values in DnsConstants from dotted lowercase (dns.class / dns.name / dns.domain / dns.server / dns.type / term) to the project-wide Camel<Component><Field> convention: DNS_CLASS -> CamelDnsClass DNS_NAME -> CamelDnsName DNS_DOMAIN -> CamelDnsDomain DNS_SERVER -> CamelDnsServer DNS_TYPE -> CamelDnsType TERM -> CamelDnsTerm The Java field names are unchanged so routes and code that reference the constants symbolically continue to work without changes. Routes that set the headers by their literal string value must be updated. Updates the in-module tests to go through DnsConstants (preserving the existing 4.14.x test idioms), refreshes the DnsComponent / DnsWikipediaProducer Javadoc and the component documentation references, and regenerates the component metadata, catalog, and endpoint DSL factory. The version-specific upgrade-guide entry is added on the main branch (per the backport upgrade-guide policy), not on this maintenance branch. Reported by Claude Code on behalf of Andrea Cosentino Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
gnodet
approved these changes
May 22, 2026
Contributor
gnodet
left a comment
There was a problem hiding this comment.
Clean backport of #23411 to camel-4.14.x. Verified the following:
- Header renames: All six constants in
DnsConstantscorrectly renamed from dotted-lowercase (dns.class,dns.name, etc.) toCamel<Component><Field>convention (CamelDnsClass,CamelDnsName, etc.) -- identical to the original PR and the 4.18.x backport (#23459). - File coverage: Same 16 files as the 4.18.x backport -- source, generated artifacts (catalog JSON, endpoint DSL factory), docs, and tests. No files missing, no extra files.
- Tests: All 9 test files updated from literal header strings to
DnsConstants.*references. The existing 4.14.x test idioms (try/catch +fail()+ JUnit 5) are correctly preserved -- only the header key references changed. - Docs:
dns-component.adoccorrectly updated. Thedns.querytoCamelDnsNamefix in the Dig section is a pre-existing doc bug fix (there was never adns.queryheader --DnsDigProducerreadsDNS_NAME), matching the original PR. - Upgrade guide: Correctly omitted from this branch per backport policy. The PR description states a separate doc-sync PR will add the
camel-4x-upgrade-guide-4_14.adocentry onmain. - Generated artifacts:
dns.json(both catalog and component-local) andDnsEndpointBuilderFactory.javaare consistent with the constant value changes.
LGTM.
Claude Code on behalf of Guillaume Nodet
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #23411 to
camel-4.14.xCherry-pick of #23411 onto
camel-4.14.x(fixVersion 4.14.8).Renames the Exchange header string values in
DnsConstantsfrom the legacydotted-lowercase names to the project-wide
Camel<Component><Field>convention:DnsConstants.DNS_CLASSdns.classCamelDnsClassDnsConstants.DNS_NAMEdns.nameCamelDnsNameDnsConstants.DNS_DOMAINdns.domainCamelDnsDomainDnsConstants.DNS_SERVERdns.serverCamelDnsServerDnsConstants.DNS_TYPEdns.typeCamelDnsTypeDnsConstants.TERMtermCamelDnsTermThe Java field names are unchanged, so routes that reference the constants
symbolically keep working; routes that set the headers by literal string value
must be updated.
Notes for this backport
metadata, catalog, endpoint DSL factory) only.
test idioms (try/catch + JUnit5) and applying only the literal-to-constant
header rename, then verified with
mvn clean installincomponents/camel-dns(23 tests, 0 failures).
camel-4x-upgrade-guide-4_14.adoc)is added on
mainvia a separate doc-sync PR, per the backportupgrade-guide policy (canonical guides live on
main).Original PR: #23411
Original author: @oscerd
Claude Code on behalf of Andrea Cosentino