What version of OpenRewrite are you using?
I am using
- Gradle Plugin
7.6.1
rewrite-migrate-java:3.9.0
How are you running OpenRewrite?
Using the Gradle Plugin applied in the root Project of a multi-project build with the org.openrewrite.java.migrate.jakarta.JakartaEE10 recipe activated.
What is the smallest, simplest way to reproduce the problem?
Applying the org.openrewrite.java.migrate.jakarta.JavaxAnnotationMigrationToJakartaAnnotation recipe to the following class replaces the javax.annotation.processing package with the non-existent jakarta.annotation.processing package.
package org.example;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
@SupportedAnnotationTypes("org.example.MyAnnotation")
public class MyAnnotationProcessor extends AbstractProcessor {
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
return false;
}
}
What did you expect to see?
The class should not have been changed, because the javax.annotation.processing package is part of the Pluggable Annotation Processing API which is part of the JDK.
Yes, should be an easy fix
What version of OpenRewrite are you using?
I am using
7.6.1rewrite-migrate-java:3.9.0How are you running OpenRewrite?
Using the Gradle Plugin applied in the root Project of a multi-project build with the
org.openrewrite.java.migrate.jakarta.JakartaEE10recipe activated.What is the smallest, simplest way to reproduce the problem?
Applying the
org.openrewrite.java.migrate.jakarta.JavaxAnnotationMigrationToJakartaAnnotationrecipe to the following class replaces thejavax.annotation.processingpackage with the non-existentjakarta.annotation.processingpackage.What did you expect to see?
The class should not have been changed, because the
javax.annotation.processingpackage is part of the Pluggable Annotation Processing API which is part of the JDK.Are you interested in contributing a fix to OpenRewrite?
Yes, should be an easy fix