Skip to content

Commit

Permalink
Recognize a couple @NonNull annotations as type-use annotations.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 500180559
  • Loading branch information
cpovirk authored and google-java-format Team committed Jan 6, 2023
1 parent d9ddb94 commit d24deb9
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,10 @@ private static ImmutableSetMultimap<String, String> typeAnnotations() {
ImmutableSetMultimap.Builder<String, String> result = ImmutableSetMultimap.builder();
for (String annotation :
ImmutableList.of(
"org.jspecify.annotations.NonNull",
"org.jspecify.annotations.Nullable",
"org.jspecify.nullness.Nullable",
"org.checkerframework.checker.nullness.qual.NonNull",
"org.checkerframework.checker.nullness.qual.Nullable")) {
String simpleName = annotation.substring(annotation.lastIndexOf('.') + 1);
result.put(simpleName, annotation);
Expand Down

0 comments on commit d24deb9

Please sign in to comment.