File tree Expand file tree Collapse file tree
main/resources/META-INF/rewrite
test/java/org/openrewrite/java/migrate/jspecify Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,6 +71,10 @@ recipeList:
7171 oldFullyQualifiedTypeName : javax.annotation.Nullable
7272 newFullyQualifiedTypeName : org.jspecify.annotations.Nullable
7373 ignoreDefinition : true
74+ - org.openrewrite.java.ChangeType :
75+ oldFullyQualifiedTypeName : javax.annotation.CheckForNull
76+ newFullyQualifiedTypeName : org.jspecify.annotations.Nullable
77+ ignoreDefinition : true
7478 - org.openrewrite.java.ChangeType :
7579 oldFullyQualifiedTypeName : javax.annotation.Nonnull
7680 newFullyQualifiedTypeName : org.jspecify.annotations.NonNull
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ void migrateFromJavaxAnnotationApiToJspecify() {
4646 """
4747 import javax.annotation.Nonnull;
4848 import javax.annotation.Nullable;
49+ import javax.annotation.CheckForNull;
4950
5051 public class Test {
5152 @Nonnull
@@ -54,6 +55,8 @@ public class Test {
5455 public String field2;
5556 @Nullable
5657 public Foo.Bar foobar;
58+ @CheckForNull
59+ public String checked;
5760 }
5861
5962 interface Foo {
@@ -73,6 +76,8 @@ public class Test {
7376 @Nullable
7477 public String field2;
7578 public Foo.@Nullable Bar foobar;
79+ @Nullable
80+ public String checked;
7681 }
7782
7883 interface Foo {
You can’t perform that action at this time.
0 commit comments