Skip to content

Commit

Permalink
Suggestionsg
Browse files Browse the repository at this point in the history
  • Loading branch information
rickie committed Dec 19, 2022
1 parent 733688a commit 59212f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public final class IdentityConversion extends BugChecker implements MethodInvoca
"com.google.common.collect.ImmutableSetMultimap",
"com.google.common.collect.ImmutableTable")
.named("copyOf"),
staticMethod()
.onClass("com.google.errorprone.matchers.Matchers")
.namedAnyOf("allOf", "anyOf"),
staticMethod()
.onClassAny(
Primitives.allWrapperTypes().stream()
Expand All @@ -70,10 +73,7 @@ public final class IdentityConversion extends BugChecker implements MethodInvoca
staticMethod()
.onClass("reactor.core.publisher.Flux")
.namedAnyOf("concat", "firstWithSignal", "from", "merge"),
staticMethod().onClass("reactor.core.publisher.Mono").namedAnyOf("from", "fromDirect"),
staticMethod()
.onClass("com.google.errorprone.matchers.Matchers")
.namedAnyOf("allOf", "anyOf"));
staticMethod().onClass("reactor.core.publisher.Mono").namedAnyOf("from", "fromDirect"));

/** Instantiates a new {@link IdentityConversion} instance. */
public IdentityConversion() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ void identification() {
" Mono<Integer> m2 = Mono.fromDirect(Mono.just(1));",
"",
" // BUG: Diagnostic contains:",
" Matcher allOfMatcher = Matchers.allOf(annotations(AT_LEAST_ONE, isType(\"foo\")));",
" Matcher matcher1 = Matchers.allOf(annotations(AT_LEAST_ONE, isType(\"foo\")));",
" // BUG: Diagnostic contains:",
" Matcher anyOfMatcher = Matchers.anyOf(annotations(AT_LEAST_ONE, isType(\"foo\")));",
" Matcher matcher2 = Matchers.anyOf(annotations(AT_LEAST_ONE, isType(\"bar\")));",
" }",
"}")
.doTest();
Expand Down

0 comments on commit 59212f0

Please sign in to comment.