Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
Laurens-W and github-actions[bot] authored Nov 28, 2024
1 parent 998c31d commit 6a9a2ad
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
import org.openrewrite.*;
import org.openrewrite.csharp.tree.Cs;
import org.openrewrite.java.JavaVisitor;
import org.openrewrite.java.tree.*;
import org.openrewrite.java.tree.J;
import org.openrewrite.java.tree.Space;
import org.openrewrite.marker.Markers;
import org.openrewrite.test.RecipeSpec;
import org.openrewrite.test.RewriteTest;
Expand Down Expand Up @@ -351,7 +352,7 @@ void foo() throws IllegalAccessException {
, spec -> spec.beforeRecipe(compUnit -> {
Cs.CompilationUnit cSharpCompUnit = (Cs.CompilationUnit) new JavaVisitor<ExecutionContext>() {
@Override
public J visitThrow(J.Throw thrown, ExecutionContext executionContext) {
public J visitThrow(J.Throw thrown, ExecutionContext ctx) {
if (thrown.getException() instanceof J.Identifier) {
return thrown.withException(new J.Empty(Tree.randomId(), Space.EMPTY, Markers.EMPTY));
}
Expand All @@ -377,7 +378,7 @@ public J visitThrow(J.Throw thrown, ExecutionContext executionContext) {
}

public JavaVisitor<ExecutionContext> getJavaToCsharpVisitor() {
return new JavaVisitor<ExecutionContext>() {
return new JavaVisitor<>() {


};
Expand Down

0 comments on commit 6a9a2ad

Please sign in to comment.