Croway commented on code in PR #30238:
URL: https://github.com/apache/camel/pull/30238#discussion_r4598579736
##########
core/camel-core-model/src/main/java/org/apache/camel/model/RemoveHeadersDefinition.java:
##########
@@ -108,6 +110,8 @@ public String[] getExcludePatterns() {
public void setExcludePatterns(String[] excludePatterns) {
this.excludePatterns = excludePatterns;
+ // XML and YAML have only the excludePattern option: it holds them
too, so a dumped route keeps them
+ this.excludePattern = PatternHelper.combinePatterns(excludePatterns);
Review Comment:
Reproduced: a Java route with `removeHeaders("*", "header1", "Camel*")` was
dumped to Java as `removeHeaders("*", "header1|Camel.*")`. The guard now only
checks that the Java exclude patterns are set, so the Java dump writes them as
given, for removeHeaders and removeProperties. That also keeps a placeholder as
its own argument. `LwModelToJavaDumperTest.testDumpSeveralExcludePatterns`
covers it (1f969b7256af).
_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]