mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 15:41:26 +07:00
IDEA-156245 @NotNull doesn't seem to work for enums
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
enum NotNullEnum {
|
||||
ONE("One"),
|
||||
TWO(<warning descr="Passing 'null' argument to parameter annotated as @NotNull">null</warning>),
|
||||
THREE(<warning descr="Passing 'null' argument to parameter annotated as @NotNull">null</warning>) {};
|
||||
|
||||
private final @NotNull String param;
|
||||
NotNullEnum(@NotNull String param) {
|
||||
this.param = param;
|
||||
}
|
||||
@NotNull
|
||||
public String getParam() {
|
||||
return param;
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
NotNullEnum one = ONE;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user