Skip to content

Commit 9712137

Browse files
timtebeekTeamModerne
authored andcommitted
refactor: Fix missing braces
Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.staticanalysis.NeedBraces?organizationId=T3BlblJld3JpdGU%3D Co-authored-by: Moderne <[email protected]>
1 parent 1565e78 commit 9712137

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main/java/org/openrewrite/java/testing/junit5/AssertTrueInstanceofToAssertInstanceOf.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ public J.MethodInvocation visitMethodInvocation(J.MethodInvocation method, Execu
5757
reason = null;
5858
} else if (mi.getArguments().size() == 2) {
5959
reason = mi.getArguments().get(1);
60-
} else return mi;
60+
} else {
61+
return mi;
62+
}
6163

6264
if (argument instanceof J.InstanceOf) {
6365
J.InstanceOf instanceOf = (J.InstanceOf) argument;
@@ -75,7 +77,9 @@ public J.MethodInvocation visitMethodInvocation(J.MethodInvocation method, Execu
7577
} else if (mi.getArguments().size() == 2) {
7678
reason = mi.getArguments().get(0);
7779
argument = mi.getArguments().get(1);
78-
} else return mi;
80+
} else {
81+
return mi;
82+
}
7983

8084
if (argument instanceof J.InstanceOf) {
8185
J.InstanceOf instanceOf = (J.InstanceOf) argument;

0 commit comments

Comments
 (0)