From c18ae528a641b2f272db7e332bf0d601f7c63888 Mon Sep 17 00:00:00 2001 From: ghm Date: Tue, 25 Jan 2022 09:03:34 -0800 Subject: [PATCH] Autofix all the AnnotationPosition findings in EP. PiperOrigin-RevId: 424096869 --- .../bugpatterns/formatstring/InlineFormatString.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/google/errorprone/bugpatterns/formatstring/InlineFormatString.java b/core/src/main/java/com/google/errorprone/bugpatterns/formatstring/InlineFormatString.java index a7aef7f8693..12a99343e56 100644 --- a/core/src/main/java/com/google/errorprone/bugpatterns/formatstring/InlineFormatString.java +++ b/core/src/main/java/com/google/errorprone/bugpatterns/formatstring/InlineFormatString.java @@ -82,8 +82,8 @@ private static boolean secondParameterIsString(ExpressionTree tree, VisitorState && isSubtype(methodSymbol.getParameters().get(1).type, state.getSymtab().stringType, state); } - @Nullable - private static ExpressionTree formatString(MethodInvocationTree tree, VisitorState state) { + private static @Nullable ExpressionTree formatString( + MethodInvocationTree tree, VisitorState state) { ImmutableList args = FormatStringUtils.formatMethodArguments(tree, state); if (!args.isEmpty()) { return args.get(0); @@ -94,8 +94,7 @@ private static ExpressionTree formatString(MethodInvocationTree tree, VisitorSta return formatMethodAnnotationArguments(tree, state); } - @Nullable - private static ExpressionTree formatMethodAnnotationArguments( + private static @Nullable ExpressionTree formatMethodAnnotationArguments( MethodInvocationTree tree, VisitorState state) { MethodSymbol sym = getSymbol(tree); if (sym == null) {