What is the smallest, simplest way to reproduce the problem?
import java.util.HashSet;
import org.jetbrains.annotations.Nullable;
class Test {
public @Nullable HashSet<@Nullable Integer> values = new HashSet<>();
}
What is the full stack trace of any errors you encountered?
org.openrewrite.internal.RecipeRunException: java.lang.ClassCastException: class org.openrewrite.java.tree.J$AnnotatedType cannot be cast to class org.openrewrite.java.tree.J$ParameterizedType (org.openrewrite.java.tree.J$AnnotatedType and org.openrewrite.java.tree.J$ParameterizedType are in unnamed module of loader 'app')
at app//org.openrewrite.TreeVisitor.visit(TreeVisitor.java:329)
at app//org.openrewrite.staticanalysis.UseCollectionInterfaces$1.visit(UseCollectionInterfaces.java:106)
What is the smallest, simplest way to reproduce the problem?
What is the full stack trace of any errors you encountered?
Are you interested in contributing a fix to OpenRewrite?
PR is coming in a minute...