oscerd opened a new pull request, #23410:
URL: https://github.com/apache/camel/pull/23410
## 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
- [x] `mvn -DskipTests formatter:format impsort:sort install` in
`components/camel-solr` — BUILD SUCCESS, no formatter/import diffs.
- [x] Repo-wide search for stale `"SolrField."` / `"SolrParam."` literals —
only the upgrade-guide entry retains them (deliberate, documenting the old ->
new rename).
- [x] No catalog / metadata / endpoint-DSL artifacts reference the prefix
values (they are not annotated with `@Metadata`), so no project-wide
regeneration is required.
- [x] 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_
--
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]