File tree Expand file tree Collapse file tree
rewrite-core/src/main/java/org/openrewrite
rewrite-javascript/rewrite/src/javascript Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -268,14 +268,14 @@ public String toString() {
268268 }
269269
270270 public static boolean isLocalAndHasNoChanges (@ Nullable SourceFile before , @ Nullable SourceFile after ) {
271- // try {
272- // return (before == after) ||
273- // (before != null && after != null &&
274- // // Remote source files are fetched on `printAll`, let's avoid that cost.
275- // !(before instanceof Remote) && !(after instanceof Remote) &&
276- // before.printAll().equals(after.printAll()));
277- // } catch (Exception e) {
271+ try {
272+ return (before == after ) ||
273+ (before != null && after != null &&
274+ // Remote source files are fetched on `printAll`, let's avoid that cost.
275+ !(before instanceof Remote ) && !(after instanceof Remote ) &&
276+ before .printAll ().equals (after .printAll ()));
277+ } catch (Exception e ) {
278278 return false ;
279- // }
279+ }
280280 }
281281}
Original file line number Diff line number Diff line change @@ -26,15 +26,16 @@ export function hasSourcePath(filePattern: string): Promise<RpcRecipe> | TreeVis
2626 } ) : new IsSourceFile ( filePattern ) ;
2727}
2828
29- export function usesMethod ( methodMatcher : string , matchOverrides : boolean = false ) : Promise < RpcRecipe > | TreeVisitor < any , ExecutionContext > {
29+ export function usesMethod ( methodPattern : string , matchOverrides : boolean = false ) : Promise < RpcRecipe > | TreeVisitor < any , ExecutionContext > {
3030 return RewriteRpc . get ( ) ? RewriteRpc . get ( ) ! . prepareRecipe ( "org.openrewrite.java.search.UsesMethod" , {
31- methodMatcher ,
31+ methodPattern ,
3232 matchOverrides
33- } ) : new UsesMethod ( methodMatcher ) ;
33+ } ) : new UsesMethod ( methodPattern ) ;
3434}
3535
3636export function usesType ( fullyQualifiedType : string ) : Promise < RpcRecipe > | TreeVisitor < any , ExecutionContext > {
3737 return RewriteRpc . get ( ) ? RewriteRpc . get ( ) ! . prepareRecipe ( "org.openrewrite.java.search.UsesType" , {
38- fullyQualifiedType
38+ fullyQualifiedType,
39+ includeImplicit : false
3940 } ) : new UsesType ( fullyQualifiedType ) ;
4041}
You can’t perform that action at this time.
0 commit comments