diff --git a/core/src/main/java/com/google/errorprone/bugpatterns/UnnecessarilyVisible.java b/core/src/main/java/com/google/errorprone/bugpatterns/UnnecessarilyVisible.java index 77a60f328d7..f09be5fe033 100644 --- a/core/src/main/java/com/google/errorprone/bugpatterns/UnnecessarilyVisible.java +++ b/core/src/main/java/com/google/errorprone/bugpatterns/UnnecessarilyVisible.java @@ -56,6 +56,8 @@ public final class UnnecessarilyVisible extends BugChecker implements MethodTree VisitorState.memoize( s -> Stream.of( + "com.google.errorprone.refaster.annotation.AfterTemplate", + "com.google.errorprone.refaster.annotation.BeforeTemplate", "com.google.inject.Inject", "com.google.inject.Provides", "com.google.inject.multibindings.ProvidesIntoMap", diff --git a/core/src/main/java/com/google/errorprone/bugpatterns/UnusedVariable.java b/core/src/main/java/com/google/errorprone/bugpatterns/UnusedVariable.java index cd41fac6081..fa3c50bbbb4 100644 --- a/core/src/main/java/com/google/errorprone/bugpatterns/UnusedVariable.java +++ b/core/src/main/java/com/google/errorprone/bugpatterns/UnusedVariable.java @@ -149,6 +149,8 @@ public final class UnusedVariable extends BugChecker implements CompilationUnitT // TODO(ghm): Find a sensible place to dedupe this with UnnecessarilyVisible. private static final ImmutableSet ANNOTATIONS_INDICATING_PARAMETERS_SHOULD_BE_CHECKED = ImmutableSet.of( + "com.google.errorprone.refaster.annotation.AfterTemplate", + "com.google.errorprone.refaster.annotation.BeforeTemplate", "com.google.inject.Inject", "com.google.inject.Provides", "com.google.inject.multibindings.ProvidesIntoMap",