mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
22 lines
458 B
Java
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) {
|
|
}
|
|
}
|
|
} |