File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed
main/resources/META-INF/rewrite
test/java/org/openrewrite/java/migrate/jakarta Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ dependencies {
5656 testRuntimeOnly(" com.fasterxml.jackson.datatype:jackson-datatype-jsr353" )
5757 testRuntimeOnly(" com.fasterxml.jackson.core:jackson-core" )
5858 testRuntimeOnly(" com.fasterxml.jackson.core:jackson-databind" )
59+ testRuntimeOnly(" com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider" )
5960 testRuntimeOnly(" com.fasterxml.jackson.module:jackson-module-jaxb-annotations" )
6061 testRuntimeOnly(" org.apache.johnzon:johnzon-core:1.2.18" )
6162 testRuntimeOnly(" org.codehaus.groovy:groovy:latest.release" )
Original file line number Diff line number Diff line change @@ -918,6 +918,9 @@ recipeList:
918918 - org.openrewrite.java.ChangeType :
919919 oldFullyQualifiedTypeName : com.fasterxml.jackson.datatype.jsr353.JSR353Module
920920 newFullyQualifiedTypeName : com.fasterxml.jackson.datatype.jsonp.JSONPModule
921+ - org.openrewrite.java.ChangeType :
922+ oldFullyQualifiedTypeName : com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider
923+ newFullyQualifiedTypeName : com.fasterxml.jackson.jakarta.rs.json.JacksonXmlBindJsonProvider
921924 - org.openrewrite.java.ChangeType :
922925 oldFullyQualifiedTypeName : com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule
923926 newFullyQualifiedTypeName : com.fasterxml.jackson.module.jakarta.xmlbind.JakartaXmlBindAnnotationModule
Original file line number Diff line number Diff line change @@ -331,4 +331,27 @@ void foo() {
331331 )
332332 );
333333 }
334+
335+ @ Issue ("https://github.com/openrewrite/rewrite-migrate-java/issues/653" )
336+ @ Test
337+ void thatJaxbJsonProviderIsRewritten () {
338+ rewriteRun (
339+ spec -> spec .parser (JavaParser .fromJavaVersion ().classpath (
340+ "jackson-databind" ,
341+ "jackson-jaxrs-json-provider" )),
342+ //language=java
343+ java (
344+ """
345+ import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
346+
347+ public class A extends JacksonJaxbJsonProvider {}
348+ """ ,
349+ """
350+ import com.fasterxml.jackson.jakarta.rs.json.JacksonXmlBindJsonProvider;
351+
352+ public class A extends JacksonXmlBindJsonProvider {}
353+ """
354+ )
355+ );
356+ }
334357}
You can’t perform that action at this time.
0 commit comments