mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 17:07:05 +07:00
normalize array initializer in surround with try catch (IDEA-128218)
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
// "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 ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
System.out.println(a);
|
||||
}
|
||||
|
||||
|
||||
private static class Ex extends Exception {
|
||||
public Ex(String s) {
|
||||
}
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
// "Surround with try/catch" "true"
|
||||
public class ExTest {
|
||||
public static String maybeThrow(String data) throws Ex {
|
||||
throw new Ex(data);
|
||||
}
|
||||
|
||||
{
|
||||
String[] a = {mayb<caret>eThrow("")};
|
||||
System.out.println(a);
|
||||
}
|
||||
|
||||
|
||||
private static class Ex extends Exception {
|
||||
public Ex(String s) {
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user