Skip to content

Commit

Permalink
UnusedMethod: add additional exempting method annotations
Browse files Browse the repository at this point in the history
Fixes #2617

PiperOrigin-RevId: 404342007
  • Loading branch information
rickie authored and Error Prone Team committed Oct 19, 2021
1 parent ee539c8 commit 07af920
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,25 @@ public final class UnusedMethod extends BugChecker implements CompilationUnitTre

private static final ImmutableSet<String> EXEMPTING_METHOD_ANNOTATIONS =
ImmutableSet.of(
"com.fasterxml.jackson.annotation.JsonCreator",
"com.google.inject.Provides",
"com.google.inject.Inject",
"com.google.inject.multibindings.ProvidesIntoMap",
"com.google.inject.multibindings.ProvidesIntoSet",
"javax.annotation.PreDestroy",
"javax.annotation.PostConstruct",
"javax.persistence.PostLoad",
"javax.inject.Inject",
"org.testng.annotations.DataProvider");
"javax.persistence.PostLoad",
"org.aspectj.lang.annotation.Pointcut",
"org.aspectj.lang.annotation.Before",
"org.springframework.context.annotation.Bean",
"org.testng.annotations.AfterClass",
"org.testng.annotations.AfterMethod",
"org.testng.annotations.BeforeClass",
"org.testng.annotations.BeforeMethod",
"org.testng.annotations.DataProvider",
"org.junit.AfterClass",
"org.junit.BeforeClass");

/** The set of types exempting a type that is extending or implementing them. */
private static final ImmutableSet<String> EXEMPTING_SUPER_TYPES = ImmutableSet.of();
Expand Down

0 comments on commit 07af920

Please sign in to comment.