Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/surroundWithTry/afterLambdaCodeBlock.java
Anna Kozlova 5a42eae302 [java]: surround with: prefer same simple names for catch parameters (IDEA-269830)
GitOrigin-RevId: 9f8b5ced2ec29cbf0f23ccfdf18d4888a55e440d
2021-05-25 06:42:12 +00:00

26 lines
526 B
Java

// "Surround with try/catch" "true"
public class ExTest {
public static void maybeThrow(String data) throws Ex {
throw new Ex(data);
}
{
Block<String> b = (t) -> {
try {
return ExTest.maybeThrow(t);
} catch (Ex e) {
<selection>e.printStackTrace();</selection>
}
};
}
private static class Ex extends Throwable {
public Ex(String s) {
}
}
}
interface Block<T> {
public void accept(T t);
}