CAMEL-23587: camel-jt400 - align Exchange header constant names with Camel naming convention#23470
Conversation
gnodet
left a comment
There was a problem hiding this comment.
LGTM. Clean, straightforward header rename following the same pattern as the other PRs in this series (camel-jira, camel-cxf, camel-mail, etc.).
The change itself is correct:
- The two remaining unprefixed constants (
KEY->CamelJt400Key,SENDER_INFORMATION->CamelJt400SenderInformation) now follow theCamelJt400*convention that the other constants in the class already use. - Java field names are unchanged, so symbolic references continue to work.
- The
Jt400Endpoint.KEYandJt400Endpoint.SENDER_INFORMATIONre-exported constants automatically pick up the new values via delegation toJt400Constants. - Generated artifacts (catalog JSON, endpoint DSL) are consistent.
- Upgrade guide entry is well-written and clearly documents the change.
One minor observation (non-blocking): the Javadoc <li> items in Jt400DataQueueConsumer.java (line ~99-100) and Jt400MsgQueueConsumer.java (line ~87) still reference the old header names as literal strings in their <ul> lists (e.g., <li>SENDER_INFORMATION: ..., <li>KEY: ...). These are internal Javadoc and not part of the public-facing docs, so it is not critical, but updating them to match the new values would keep things consistent. The other entries in the same Javadoc lists (e.g., jt400.MESSAGE_ID) also use a different prefix convention, so the whole block could use a refresh at some point.
Claude Code on behalf of Guillaume Nodet
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
🧪 CI tested the following changed modules:
All tested modules (10 modules)
|
…Camel naming convention Renames the two Exchange header string values in Jt400Constants that were not in the Camel namespace (KEY, SENDER_INFORMATION) to CamelJt400<Name>, following the convention used across the rest of the Camel component catalog and matching the pattern established in CAMEL-23526 (camel-cxf), CAMEL-23522 (camel-mail), CAMEL-23461 (camel-aws-bedrock), CAMEL-23532 (camel-vertx-websocket / camel-atmosphere-websocket / camel-iggy), and CAMEL-23576 (camel-jira). - KEY: "KEY" -> "CamelJt400Key" (data-queue key for keyed-data-queue read/write) - SENDER_INFORMATION: "SENDER_INFORMATION" -> "CamelJt400SenderInformation" The Java field names are unchanged so routes referencing the constants symbolically continue to work; routes using the literal string values must be updated (documented in the 4.21 upgrade guide). The remaining constants (MESSAGE, MESSAGE_ID, MESSAGE_FILE, MESSAGE_TYPE, MESSAGE_SEVERITY, MESSAGE_DFT_RPY, MESSAGE_REPLYTO_KEY) were already Camel-prefixed and are unchanged. The generated Endpoint DSL header accessors on Jt400HeaderNameBuilder have been renamed: kEY() -> jt400Key() and senderInformation() -> jt400SenderInformation(). All existing tests use symbolic constant references and continue to pass. Tracker: CAMEL-23577 Reported by Claude Code on behalf of Andrea Cosentino Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
Summary
Renames the two Exchange header string values in
Jt400Constantsthat werenot in the
Camelnamespace (and therefore not filtered by the defaultHeaderFilterStrategy) toCamelJt400<Name>, following the convention usedacross the rest of the Camel component catalog and matching the pattern
established in CAMEL-23526 (
camel-cxf), CAMEL-23522 (camel-mail),CAMEL-23461 (
camel-aws-bedrock), CAMEL-23532 (camel-vertx-websocket/camel-atmosphere-websocket/camel-iggy), and CAMEL-23576 (camel-jira).Jt400Constants.KEYKEYCamelJt400KeyJt400Constants.SENDER_INFORMATIONSENDER_INFORMATIONCamelJt400SenderInformationJt400Constants.KEYis the data-queue key used for keyed-data-queue read andwrite operations (the header called out in the CAMEL-23577 sweep);
SENDER_INFORMATIONis included because it was the only other unprefixedconstant in the class.
The Java field names are unchanged so routes referencing the constants
symbolically continue to work; routes using the literal string values must be
updated (documented in the 4.21 upgrade guide).
Already-compliant constants left unchanged
MESSAGE,MESSAGE_ID,MESSAGE_FILE,MESSAGE_TYPE,MESSAGE_SEVERITY,MESSAGE_DFT_RPY, andMESSAGE_REPLYTO_KEYwere alreadyCamel-prefixed.Generated artifacts
components/camel-jt400/.../jt400.json+ catalog mirrordsl/camel-endpointdsl/.../Jt400EndpointBuilderFactory.java— DSL headeraccessors renamed (
kEY()→jt400Key(),senderInformation()→jt400SenderInformation())Backports
camel-jt400exists oncamel-4.18.xandcamel-4.14.xwith the same legacyvalues — backports apply and will be filed as follow-up PRs.
Test plan
mvn testincomponents/camel-jt400— 34 tests pass (2 skipped)camel-jt400regenartifacts included
=== camel-jt400Tracker: CAMEL-23577
Reported by Claude Code on behalf of Andrea Cosentino