Skip to content

Commit

Permalink
refactor: OpenRewrite recipe best practices
Browse files Browse the repository at this point in the history
Use this link to re-run the recipe: https://app.moderne.io/recipes/builder/XX1hrwagC?organizationId=T3BlblJld3JpdGU%3D

Co-authored-by: Moderne <team@moderne.io>
  • Loading branch information
timtebeek and TeamModerne committed Dec 8, 2023
1 parent 03cf2eb commit bc745bb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private class MethodInvocationVisitor extends JavaVisitor<ExecutionContext> {
@SuppressWarnings("NullableProblems")
@Nullable
@Override
public J.MethodInvocation visitMethodInvocation(J.MethodInvocation method, ExecutionContext ec) {
public J.MethodInvocation visitMethodInvocation(J.MethodInvocation method, ExecutionContext ctx) {
return visitMethodCall(method);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public TreeVisitor<?, ExecutionContext> getVisitor() {
return new TreeVisitor<Tree, ExecutionContext>() {
@Nullable
@Override
public Tree visit(@Nullable Tree tree, ExecutionContext executionContext) {
public Tree visit(@Nullable Tree tree, ExecutionContext ctx) {
if (tree instanceof SourceFile) {
SourceFile sourceFile = ((SourceFile) tree);

Expand Down Expand Up @@ -122,7 +122,7 @@ public Tree visit(@Nullable Tree tree, ExecutionContext executionContext) {
}
}
}
return super.visit(tree, executionContext);
return super.visit(tree, ctx);
}
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ void replaceVersion32Test() {
//language=xml
xml(
"""
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="WebApp_ID">
<display-name>testWebDDNamespace</display-name>
</web-app>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="WebApp_ID">
<display-name>testWebDDNamespace</display-name>
</web-app>
""",
"""
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="WebApp_ID">
Expand Down

0 comments on commit bc745bb

Please sign in to comment.