Skip to content

Commit

Permalink
Don't fire PreferJavaTimeOverload on any static methods named assertT…
Browse files Browse the repository at this point in the history
…hat or assumeThat.

Fixes google#1437 and google#1435

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=284455194
  • Loading branch information
carterkozak authored and kmclarnon committed Feb 19, 2020
1 parent c662a6e commit 7e50c52
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ public final class PreferJavaTimeOverload extends BugChecker

private static final Matcher<ExpressionTree> IGNORED_APIS =
anyOf(
staticMethod().onClass("org.assertj.core.api.Assertions").named("assertThat"));
// For AssertJ
staticMethod().anyClass().namedAnyOf("assertThat", "assumeThat"));

private static final Matcher<ExpressionTree> JAVA_DURATION_DECOMPOSITION_MATCHER =
anyOf(
Expand Down

0 comments on commit 7e50c52

Please sign in to comment.