Skip to content

Commit d9ddb94

Browse files
Stephan202google-java-format Team
authored andcommitted
Recognize new JSpecify package name
So that its `@Nullable` annotation is treated as a type-use annotation and formatted accordingly. See jspecify/jspecify#260. Fixes #869 COPYBARA_INTEGRATE_REVIEW=#869 from PicnicSupermarket:improvement/support-new-jpecify-package-name 7a0dc20 PiperOrigin-RevId: 495701635
1 parent 8afb866 commit d9ddb94

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ 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.Nullable",
288289
"org.jspecify.nullness.Nullable",
289290
"org.checkerframework.checker.nullness.qual.Nullable")) {
290291
String simpleName = annotation.substring(annotation.lastIndexOf('.') + 1);

0 commit comments

Comments
 (0)