diff --git a/refaster-support/src/test/java/tech/picnic/errorprone/refaster/matchers/AbstractMatcherTestChecker.java b/refaster-support/src/test/java/tech/picnic/errorprone/refaster/matchers/AbstractMatcherTestChecker.java index 9bb9dfc540..9201728470 100644 --- a/refaster-support/src/test/java/tech/picnic/errorprone/refaster/matchers/AbstractMatcherTestChecker.java +++ b/refaster-support/src/test/java/tech/picnic/errorprone/refaster/matchers/AbstractMatcherTestChecker.java @@ -97,7 +97,7 @@ private static boolean isMethodSelect(ExpressionTree tree, TreePath path) { } Tree parentTree = parentPath.getLeaf(); - return parentTree instanceof MethodInvocationTree - && ((MethodInvocationTree) parentTree).getMethodSelect().equals(tree); + return parentTree instanceof MethodInvocationTree methodInvocation + && methodInvocation.getMethodSelect().equals(tree); } }