oscerd opened a new pull request, #26748:
URL: https://github.com/apache/camel/pull/26748

   ## Motivation
   
   The `jcr` producer's `CamelJcrGetById` operation mapped **every** property 
of the retrieved node onto the Exchange via 
`message.setHeader(property.getName(), ...)` without running the names through 
a `HeaderFilterStrategy`, and the insert path persisted all message headers 
(bar three JCR control keys) as node properties. Unlike most components, 
`camel-jcr` defined no `HeaderFilterStrategy`, so Camel internal header names 
(e.g. `CamelHttpUri`) were copied through unfiltered in both directions.
   
   This continues the header-filtering alignment done for `camel-coap` 
(CAMEL-24655).
   
   Jira: https://issues.apache.org/jira/browse/CAMEL-24900
   
   ## Changes
   
   - `JcrEndpoint` is now `HeaderFilterStrategyAware`, exposing a 
`headerFilterStrategy` endpoint option that defaults to 
`DefaultHeaderFilterStrategy` (filters names starting with `Camel`/`camel`, 
case-insensitively).
   - `CamelJcrGetById` runs each property name through 
`applyFilterToExternalHeaders` before `setHeader`; ordinary document properties 
are preserved.
   - The insert path runs each header through `applyFilterToCamelHeaders`, so 
Camel internal headers carried on the message are no longer persisted as node 
properties.
   - Adds `JcrGetNodeByIdHeaderInjectionTest`: a `Camel`-prefixed property 
name, in four casings, is not mapped onto the Exchange, while an ordinary 
document property still is.
   - Regenerates the catalog and endpoint-DSL metadata for the new option, and 
adds an upgrade-guide note (changed default).
   
   ## Testing
   
   `mvn -f components/camel-jcr/pom.xml test` — all 14 tests pass, including 
the new injection test and the existing insert / `getById` round-trip tests.
   
   ---
   
   _Claude Code on behalf of Andrea Cosentino (@oscerd)_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to