Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/surroundWithTry/afterArrayInitializer.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

22 lines
458 B
Java

// "Surround with try/catch" "true"
public class ExTest {
public static String maybeThrow(String data) throws Ex {
throw new Ex(data);
}
{
String[] a = new String[0];
try {
a = new String[]{maybeThrow("")};
} catch (Ex e) {
e.printStackTrace();
}
System.out.println(a);
}
private static class Ex extends Exception {
public Ex(String s) {
}
}
}