Skip to content

Commit

Permalink
Recognize more JSpecify annotations as type-use:
Browse files Browse the repository at this point in the history
- the `@Nullable` from the new package
- `@NonNull` from both packages, even though it appeared in the old package only very briefly

Note that there's no case in which it would make sense to use our existing refactorings to insert `@NonNull`. But that may change, and I figured I might as well address it while I was here.

PiperOrigin-RevId: 529824478
  • Loading branch information
cpovirk authored and Error Prone Team committed May 5, 2023
1 parent b626367 commit 87d0f20
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,9 @@ private static boolean isTypeUse(String className) {
case "libcore.util.Nullable":
case "org.checkerframework.checker.nullness.compatqual.NullableType":
case "org.checkerframework.checker.nullness.qual.Nullable":
case "org.jspecify.annotations.NonNull":
case "org.jspecify.annotations.Nullable":
case "org.jspecify.nullness.NonNull":
case "org.jspecify.nullness.Nullable":
return true;
default:
Expand Down

0 comments on commit 87d0f20

Please sign in to comment.