mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-20 02:15:59 +07:00
16 lines
548 B
Java
16 lines
548 B
Java
class Test {
|
|
private static void printAndThrow(String message, Throwable cause) {
|
|
if (message != null) {
|
|
System.err.println(message);
|
|
}
|
|
if (cause != null) {
|
|
cause.printStackTrace();
|
|
}
|
|
throw new IllegalStateException();
|
|
}
|
|
public static void main(String[] args) {
|
|
printAndThrow("test", <warning descr="Passing 'null' argument to non annotated parameter">null</warning>);
|
|
printAndThrow(<warning descr="Passing 'null' argument to non annotated parameter">null</warning>, new NullPointerException());
|
|
}
|
|
}
|