CAMEL-23597: camel-solr - align Exchange header prefix constants with Camel naming convention#23410
Merged
Merged
Conversation
Contributor
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
Contributor
|
🧪 CI tested the following changed modules:
All tested modules (8 modules)
|
gnodet
approved these changes
May 22, 2026
Contributor
gnodet
left a comment
There was a problem hiding this comment.
Looks good — prefix constants correctly renamed from SolrField. / SolrParam. to CamelSolrField. / CamelSolrParam.. Tests comprehensively updated. Upgrade guide entry is well-written with a helpful warning about HeaderFilterStrategy stripping Camel* headers at transport boundaries.
Claude Code on behalf of Guillaume Nodet
… Camel naming convention
Rename the two prefix constants in SolrConstants (camel-solr) from
"SolrField." / "SolrParam." to "CamelSolrField." / "CamelSolrParam.",
completing the alignment started in CAMEL-21697 (4.10), which renamed
the other Exchange header constants in the same file to the
CamelSolrXxx convention but missed the two prefix constants.
The Java field names (HEADER_FIELD_PREFIX, HEADER_PARAM_PREFIX) 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 (for example setHeader("SolrField.id", ...) or
setHeader("SolrParam.commit", ...)) must be updated to use the new
prefix value.
Updates the camel-solr integration tests that set the headers by literal
value (SolrInsertAndDeleteTest, SolrPingAndSearchTest, SolrTestSupport),
the inline javadoc comments in SolrProducer and SolrRequestConverter,
the solr-component.adoc documentation snippets, and adds a 4.21
upgrade-guide entry.
Consistent with the alignment applied in CAMEL-23506, CAMEL-23508,
CAMEL-23515, CAMEL-23516, CAMEL-23522 and CAMEL-23526.
Reported by Claude Code on behalf of Andrea Cosentino
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
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.
Summary
Renames the two Exchange header prefix constants in
SolrConstants(camel-solr) to follow theCamelXxxnaming convention already used by the other constants in the same file, completing the alignment started in CAMEL-21697 (4.10):SolrConstants.HEADER_FIELD_PREFIXvalue:"SolrField."->"CamelSolrField."SolrConstants.HEADER_PARAM_PREFIXvalue:"SolrParam."->"CamelSolrParam."The Java field names (
HEADER_FIELD_PREFIX,HEADER_PARAM_PREFIX) are unchanged, so routes that reference the constants symbolically continue to work without changes. Routes that set the headers by their literal string value (setHeader("SolrField.id", ...)/setHeader("SolrParam.commit", ...)) must be updated to the new prefix — documented in the 4.21 upgrade guide entry added by this PR.Consistent with the alignment applied in CAMEL-23506 (
camel-aws2-sqs/camel-aws2-sns), CAMEL-23508, CAMEL-23510, CAMEL-23515, CAMEL-23516, CAMEL-23522 (camel-mail), CAMEL-23526 (camel-cxf), and CAMEL-23532 (camel-vertx-websocket/camel-atmosphere-websocket/camel-iggy).What changed
SolrConstants.java: prefix values renamed.SolrProducer.java/SolrRequestConverter.java: inline javadoc comments updated to reference the new literal prefixes.SolrInsertAndDeleteTest,SolrPingAndSearchTest,SolrTestSupport: integration-test header literals updated to the new prefixes.solr-component.adoc: documentation snippets updated.camel-4x-upgrade-guide-4_21.adoc: new=== camel-solrupgrade-guide entry mirroring the cxf/mail/aws-sqs notes.Test plan
mvn -DskipTests formatter:format impsort:sort installincomponents/camel-solr— BUILD SUCCESS, no formatter/import diffs."SolrField."/"SolrParam."literals — only the upgrade-guide entry retains them (deliberate, documenting the old -> new rename).@Metadata), so no project-wide regeneration is required.mvn clean install -DskipTestsruns locally — note: dies atcore/camel-xml-ioschemagendue to a pre-existing JDK 21 + worktree-path env issue (jaxb2-plugin URL-decodes+in the worktree path as space) that is unrelated to this change; CI will cover the cross-module check.Claude Code on behalf of Andrea Cosentino