Skip to content

Commit

Permalink
Require static import of com.google.errorprone.matchers.Matchers me…
Browse files Browse the repository at this point in the history
…thods (#201)
  • Loading branch information
oxkitsune authored Aug 18, 2022
1 parent 4ca75c6 commit 9ab5bbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public final class StaticImport extends BugChecker implements MemberSelectTreeMa
"com.google.errorprone.BugPattern.LinkType",
"com.google.errorprone.BugPattern.SeverityLevel",
"com.google.errorprone.BugPattern.StandardTags",
"com.google.errorprone.matchers.Matchers",
"com.google.errorprone.refaster.ImportPolicy",
"com.mongodb.client.model.Accumulators",
"com.mongodb.client.model.Aggregates",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package tech.picnic.errorprone.refaster.util;

import static com.google.errorprone.matchers.Matchers.isArrayType;

import com.google.errorprone.VisitorState;
import com.google.errorprone.matchers.Matcher;
import com.google.errorprone.matchers.Matchers;
import com.sun.source.tree.ExpressionTree;

/** A matcher of array-typed expressions, for use with Refaster's {@code @Matches} annotation. */
public final class IsArray implements Matcher<ExpressionTree> {
private static final long serialVersionUID = 1L;
private static final Matcher<ExpressionTree> DELEGATE = Matchers.isArrayType();
private static final Matcher<ExpressionTree> DELEGATE = isArrayType();

@Override
public boolean matches(ExpressionTree tree, VisitorState state) {
Expand Down

0 comments on commit 9ab5bbe

Please sign in to comment.