Remove annotation from void method

MSAL

Nullability annotations are meaningless on methods returning void, and type-use annotations such as JSpecify's @Nullable are not permitted there. This recipe removes such annotations so they are not carried over by a later ChangeType.

org.openrewrite.java.migrate.jspecify.RemoveAnnotationFromVoidMethod

Required

The type of annotation to remove from methods returning void.

mod run . --recipe=org.openrewrite.java.migrate.jspecify.RemoveAnnotationFromVoidMethod \ -P annotationType='org.jetbrains.annotations.*ull*'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.