Skip to content

CAMEL-23597: camel-solr - align Exchange header prefix constants with Camel naming convention#23410

Merged
oscerd merged 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23597
May 22, 2026
Merged

CAMEL-23597: camel-solr - align Exchange header prefix constants with Camel naming convention#23410
oscerd merged 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23597

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 21, 2026

Summary

Renames the two Exchange header prefix constants in SolrConstants (camel-solr) to follow the CamelXxx naming convention already used by the other constants in the same file, completing the alignment started in CAMEL-21697 (4.10):

  • SolrConstants.HEADER_FIELD_PREFIX value: "SolrField." -> "CamelSolrField."
  • SolrConstants.HEADER_PARAM_PREFIX value: "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-solr upgrade-guide entry mirroring the cxf/mail/aws-sqs notes.

Test plan

  • mvn -DskipTests formatter:format impsort:sort install in components/camel-solr — BUILD SUCCESS, no formatter/import diffs.
  • Repo-wide search for stale "SolrField." / "SolrParam." literals — only the upgrade-guide entry retains them (deliberate, documenting the old -> new rename).
  • No catalog / metadata / endpoint-DSL artifacts reference the prefix values (they are not annotated with @Metadata), so no project-wide regeneration is required.
  • Full-reactor mvn clean install -DskipTests runs locally — note: dies at core/camel-xml-io schemagen due 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.
  • CI green.

Claude Code on behalf of Andrea Cosentino

@github-actions
Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

🧪 CI tested the following changed modules:

  • components/camel-solr
  • docs
All tested modules (8 modules)
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Launcher :: Container
  • Camel :: Solr
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

Copy link
Copy Markdown
Contributor

@gnodet gnodet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants