Skip to content

Commit

Permalink
Fix FormatStringAnnotation warning in RequiredAnnotationProcessor
Browse files Browse the repository at this point in the history
[]

RELNOTES: Fix FormatStringAnnotation warning in RequiredAnnotationProcessor

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=260428872
  • Loading branch information
sumitbhagwani authored and nick-someone committed Jul 29, 2019
1 parent 5058110 commit e20dd7b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package com.google.errorprone.refaster.annotation;

import com.google.errorprone.annotations.FormatMethod;
import com.google.errorprone.annotations.FormatString;
import java.util.List;
import java.util.Map.Entry;
import java.util.Set;
Expand Down Expand Up @@ -115,8 +117,9 @@ public Void visitArray(List<? extends AnnotationValue> vals, Void p) {
validateElements(element.getEnclosedElements());
}

@FormatMethod
private void printError(
Element element, AnnotationMirror annotation, String message, Object... args) {
Element element, AnnotationMirror annotation, @FormatString String message, Object... args) {
processingEnv
.getMessager()
.printMessage(Kind.ERROR, String.format(message, args), element, annotation);
Expand Down

0 comments on commit e20dd7b

Please sign in to comment.