From a72325915d0d7c898efe353c0703be7e7fde40cd Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Fri, 5 Jul 2024 12:13:26 +0200 Subject: [PATCH] Migrate OpenSymphony classes as indicated in the guide (#4) For https://github.com/openrewrite/rewrite-struts/issues/1 --- src/main/resources/META-INF/rewrite/struts6.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/resources/META-INF/rewrite/struts6.yml b/src/main/resources/META-INF/rewrite/struts6.yml index 60ef9ea..b88f637 100644 --- a/src/main/resources/META-INF/rewrite/struts6.yml +++ b/src/main/resources/META-INF/rewrite/struts6.yml @@ -25,6 +25,7 @@ displayName: Migrate to Struts 6.0 description: Migrate Struts 2.x to Struts 6.0 recipeList: - org.openrewrite.java.struts.migrate6.MigrateAwareInterfaces + - org.openrewrite.java.struts.migrate6.MigrateOpenSymphonyClasses - org.openrewrite.java.struts.migrate6.UpgradeStruts6Dependencies - org.openrewrite.java.struts.MigrateStrutsDtd: strutsVersion: 6.0 @@ -198,3 +199,18 @@ recipeList: - org.openrewrite.java.ChangeType: oldFullyQualifiedTypeName: org.apache.struts2.util.ServletContextAware newFullyQualifiedTypeName: org.apache.struts2.action.ServletContextAware +--- +type: specs.openrewrite.org/v1beta/recipe +name: org.openrewrite.java.struts.migrate6.MigrateOpenSymphonyClasses +displayName: Migrate OpenSymphony classes to Struts 6.0 +description: Migrate classes from `com.opensymphony.xwork2` to their replacements in `org.apache.struts2`. +recipeList: + - org.openrewrite.java.ChangeType: + oldFullyQualifiedTypeName: com.opensymphony.xwork2.config.providers.XmlConfigurationProvider + newFullyQualifiedTypeName: org.apache.struts2.config.StrutsXmlConfigurationProvider + - org.openrewrite.java.ChangeType: + oldFullyQualifiedTypeName: com.opensymphony.xwork2.conversion.TypeConversionException + newFullyQualifiedTypeName: org.apache.struts2.conversion.TypeConversionException + - org.openrewrite.java.ChangeType: + oldFullyQualifiedTypeName: com.opensymphony.xwork2.XWorkException + newFullyQualifiedTypeName: org.apache.struts2.StrutsException