Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/main/resources/META-INF/rewrite/jspecify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ recipeList:
oldFullyQualifiedTypeName: javax.annotation.Nullable
newFullyQualifiedTypeName: org.jspecify.annotations.Nullable
ignoreDefinition: true
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: javax.annotation.CheckForNull
newFullyQualifiedTypeName: org.jspecify.annotations.Nullable
ignoreDefinition: true
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: javax.annotation.Nonnull
newFullyQualifiedTypeName: org.jspecify.annotations.NonNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ void migrateFromJavaxAnnotationApiToJspecify() {
"""
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.annotation.CheckForNull;

public class Test {
@Nonnull
Expand All @@ -54,6 +55,8 @@ public class Test {
public String field2;
@Nullable
public Foo.Bar foobar;
@CheckForNull
public String checked;
}

interface Foo {
Expand All @@ -73,6 +76,8 @@ public class Test {
@Nullable
public String field2;
public Foo.@Nullable Bar foobar;
@Nullable
public String checked;
}

interface Foo {
Expand Down
Loading