Skip to content

Commit

Permalink
refactor: OpenRewrite best practices
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Jul 13, 2024
1 parent 8ef710d commit 6810d2f
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,21 +159,22 @@ void instanceOf() {
rewriteRun(
groovy(
"""
def isString = "" instanceof java.lang.String
""")
def isString = "" instanceof java.lang.String
""")
);
}

@Test
void spreadOperator() {
rewriteRun(
groovy("[ ] *. toString()"),
groovy("""
class A {
def value = 1
}
[ new A() ].findAll { it -> it.value == 1 } *. value = 2
""")
groovy(
"""
class A {
def value = 1
}
[ new A() ].findAll { it -> it.value == 1 } *. value = 2
""")
);
}
}

0 comments on commit 6810d2f

Please sign in to comment.