Exempt slf4j logger from unused field removal
Don't mark unused slf4j logger fields as StrictUnusedVariable.
@@ -132,7 +132,8 @@ public final class StrictUnusedVariable extends BugChecker implements BugChecker
private static final ImmutableSet<String> EXEMPTING_SUPER_TYPES = ImmutableSet.of();
/** The set of types exempting a field of type extending them. */
- private static final ImmutableSet<String> EXEMPTING_FIELD_SUPER_TYPES = ImmutableSet.of("org.junit.rules.TestRule");
+ private static final ImmutableSet<String> EXEMPTING_FIELD_SUPER_TYPES =
+ ImmutableSet.of("org.junit.rules.TestRule", "org.slf4j.Logger");
private static final ImmutableList<String> SPECIAL_FIELDS = ImmutableList.of(
"serialVersionUID",
