mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
IDEA-126173 Specify exception type thrown by @NotNull annotations
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class CustomExceptionType {
|
||||
public void foo(Object obj, @NotNull(exception = NullPointerException.class) Object obj2) { }
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
class Test {
|
||||
public void foo(@NotNull(exception = NullPointerException.class) String a) { }
|
||||
public void foo2(@NotNull(exception = <warning descr="Custom exception class should have a constructor with a single message parameter of String type">CustomException.class</warning>) String a) { }
|
||||
}
|
||||
|
||||
class CustomException extends Exception {}
|
||||
Reference in New Issue
Block a user