@@ -40,21 +40,20 @@ public String getDescription() {
4040 public TreeVisitor <?, ExecutionContext > getVisitor () {
4141 return Preconditions .check (
4242 Preconditions .not (new UsesPredicateMethod <>()),
43- new TreeVisitor < Tree , ExecutionContext >() {
43+ new JavaIsoVisitor < ExecutionContext >() {
4444 @ Override
45- public Tree preVisit (Tree tree , ExecutionContext ctx ) {
46- Tree t = tree ;
47- t = new ChangeMethodName (
45+ public J preVisit (J java , ExecutionContext ctx ) {
46+ J j = (J ) new ChangeMethodName (
4847 "com.google.common.base.Predicate apply(..)" ,
4948 "test" ,
5049 true ,
5150 false
52- ).getVisitor ().visitNonNull (t , ctx , getCursor ().getParentOrThrow ());
53- return new ChangeType (
51+ ).getVisitor ().visitNonNull (java , ctx , getCursor ().getParentOrThrow ());
52+ return ( J ) new ChangeType (
5453 "com.google.common.base.Predicate" ,
5554 "java.util.function.Predicate" ,
5655 false
57- ).getVisitor ().visitNonNull (t , ctx , getCursor ().getParentOrThrow ());
56+ ).getVisitor ().visitNonNull (j , ctx , getCursor ().getParentOrThrow ());
5857 }
5958 }
6059 );
0 commit comments