Skip to content

Commit d24deb9

Browse files
cpovirkgoogle-java-format Team
authored andcommitted
Recognize a couple @NonNull annotations as type-use annotations.
PiperOrigin-RevId: 500180559
1 parent d9ddb94 commit d24deb9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/main/java/com/google/googlejavaformat/java/JavaInputAstVisitor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,10 @@ private static ImmutableSetMultimap<String, String> typeAnnotations() {
285285
ImmutableSetMultimap.Builder<String, String> result = ImmutableSetMultimap.builder();
286286
for (String annotation :
287287
ImmutableList.of(
288+
"org.jspecify.annotations.NonNull",
288289
"org.jspecify.annotations.Nullable",
289290
"org.jspecify.nullness.Nullable",
291+
"org.checkerframework.checker.nullness.qual.NonNull",
290292
"org.checkerframework.checker.nullness.qual.Nullable")) {
291293
String simpleName = annotation.substring(annotation.lastIndexOf('.') + 1);
292294
result.put(simpleName, annotation);

0 commit comments

Comments
 (0)