JiriOndrusek commented on code in PR #114:
URL:
https://github.com/apache/camel-upgrade-recipes/pull/114#discussion_r3504226969
##########
camel-upgrade-recipes/src/main/resources/META-INF/rewrite/4.21.yaml:
##########
@@ -233,6 +236,48 @@ recipeList:
irc.num: CamelIrcNum
irc.value: CamelIrcValue
---
+##
https://github.com/apache/camel/blob/main/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc#camel-cxf-potential-breaking-change
+type: specs.openrewrite.org/v1beta/recipe
+name: org.apache.camel.upgrade.camel421.upgradeCxfHeaders
+displayName: Migrate camel-cxf header constants to new naming convention
+description: Renames CXF header constants to CamelCxf* pattern only if
camel-cxf dependency is present.
+preconditions:
+ - org.openrewrite.java.dependencies.search.ModuleHasDependency:
+ groupIdPattern: org.apache.camel
+ artifactIdPattern: camel-cxf
+recipeList:
+ - org.apache.camel.upgrade.camel421.RenameHeaders:
+ headerMappings:
+ OPERATION_NAME: CamelCxfOperationName
Review Comment:
It depends.
- If user uses constants as headers, no change is required.
- if user uses String literals, it has to be fixed manually. Or we can
change our recipes (header renaming) to be more robust, so even in case of
common header name, they would not change acidentaly any other header with the
same name - I'm not sure whether it makes sense (or how complicated is to
achieve that)
--
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]