Skip to content

Commit

Permalink
Polish: strip unnecessary elements, add highlighting, consistent new …
Browse files Browse the repository at this point in the history
…lines
  • Loading branch information
timtebeek committed Aug 8, 2024
1 parent 5404977 commit 41dd21c
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -646,23 +646,23 @@ public void testMethod() {
@Test
@Issue("https://github.com/openrewrite/rewrite-testing-frameworks/issues/547")
void removeTryCatchFailBlocksWithReturningTry() {
//language=java
rewriteRun(
spec -> spec.recipe(new RemoveTryCatchFailBlocks()),
java(
"""
package com.helloworld;
import static org.junit.jupiter.api.Assertions.fail;
public class Foo {
class Foo {
String getFoo() {
try {
return "foo";
} catch (RuntimeException e) {
fail();
}
}
}"""));
}
"""
)
);
}
}

0 comments on commit 41dd21c

Please sign in to comment.