Croway opened a new pull request, #30238: URL: https://github.com/apache/camel/pull/30238
JIRA: [CAMEL-27079](https://issues.apache.org/jira/browse/CAMEL-27079) - The `excludePattern` description of `removeHeaders` and `removeProperties` said a comma separates patterns. It is one pattern (exact, wildcard or regular expression), as decided in CAMEL-6445, so `excludePattern="header1,header3"` kept nothing. The description now says to use a regular expression such as `header1|header3`. The runtime does not change. - The exclude patterns given in Java (`removeHeaders("*", "header1", "header3")`) were kept only in a transient array, so a route dumped as XML or YAML lost them and removed every header. `setExcludePatterns` now also fills `excludePattern`: one pattern is kept as it is, several are combined by the new `PatternHelper.combinePatterns` into one regular expression that matches the same names (`header1|Camel.*|(?:Beer(Heineken|Tuborg))`). The Java route still runs with the patterns as given. - The camel-java-io `ModelNormalizer` no longer copies a single exclude pattern itself, as the model does it now. - The Remove Headers and Remove Properties EIP pages show how to keep several headers or properties, in Java, XML and YAML. Model json, catalog, XSD and YAML DSL schema copies are regenerated. Tests: `DumpModelRemoveHeadersExcludePatternsTest` (camel-core, new: XML and YAML dumps, and the dumped XML route keeps the same headers and properties) fails before (3 of 3) and passes after. `PatternHelperTest` (camel-support) has 2 new tests, among them a check that the combined pattern matches the same names as the patterns. `RemoveHeadersExcludeTest` and the camel-java-io tests (194, including `RoundTripTest`) pass. No upgrade guide entry: the runtime behaviour does not change. _Claude Code on behalf of Federico Mariani_ -- 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]
