mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 08:50:57 +07:00
Fixes IDEA-344453 Intellij should not try to initialize an Optional var with null GitOrigin-RevId: 8097988bf1335a282138e8d09e350c3a5f65204d
22 lines
467 B
Java
22 lines
467 B
Java
// "Surround with try/catch" "true-preview"
|
|
public class ExTest {
|
|
public static String maybeThrow(String data) throws Ex {
|
|
throw new Ex(data);
|
|
}
|
|
|
|
{
|
|
String[] a = null;
|
|
try {
|
|
a = new String[]{maybeThrow("")};
|
|
} catch (Ex e) {
|
|
throw new RuntimeException(e);
|
|
}
|
|
System.out.println(a);
|
|
}
|
|
|
|
|
|
private static class Ex extends Exception {
|
|
public Ex(String s) {
|
|
}
|
|
}
|
|
} |