Skip to content

Commit

Permalink
Also replace javax/jakarta Nullable annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Jun 20, 2024
1 parent 0519927 commit 3d72485
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/main/resources/META-INF/rewrite/openrewrite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,18 @@ name: org.openrewrite.recipes.RecipeNullabilityBestPractices
displayName: Recipe nullability best practices
description: Use OpenRewrite internal nullability annotations; drop JetBrains annotations; use `package-info.java` instead.
recipeList:
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.jetbrains.annotations.Nullable
newFullyQualifiedTypeName: org.openrewrite.internal.lang.Nullable
- org.openrewrite.java.RemoveAnnotation:
annotationPattern: '@org.jetbrains.annotations.NotNull'
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.jetbrains.annotations.Nullable
newFullyQualifiedTypeName: org.openrewrite.internal.lang.Nullable
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: javax.annotation.Nullable
newFullyQualifiedTypeName: org.openrewrite.internal.lang.Nullable
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: jakarta.annotation.Nullable
newFullyQualifiedTypeName: org.openrewrite.internal.lang.Nullable
- org.openrewrite.java.RemoveAnnotation:
annotationPattern: '@org.jetbrains.annotations.NotNull'
- org.openrewrite.java.RemoveAnnotation:
annotationPattern: '@javax.annotation.NotNull'
- org.openrewrite.java.RemoveAnnotation:
annotationPattern: '@jakarta.annotation.NotNull'

0 comments on commit 3d72485

Please sign in to comment.