mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
IDEA-65566 Allow 'NotNull' as the default element behavior for a given class or package
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
import foo.*;
|
||||
|
||||
class Some {
|
||||
void foo() {
|
||||
NotNullClass.foo(<warning descr="Passing 'null' argument to parameter annotated as @NotNull">null</warning>);
|
||||
NotNullClass.foo("a");
|
||||
|
||||
NullableClass.foo(null);
|
||||
NullableClass.foo("a");
|
||||
|
||||
AnotherPackageNotNull.foo(<warning descr="Passing 'null' argument to parameter annotated as @NotNull">null</warning>);
|
||||
AnotherPackageNotNull.foo("a");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@javax.annotation.ParametersAreNonnullByDefault
|
||||
class NotNullClass {
|
||||
static void foo(String s) {}
|
||||
|
||||
}
|
||||
@javax.annotation.ParametersAreNullableByDefault
|
||||
class NullableClass {
|
||||
static void foo(String s) {}
|
||||
}
|
||||
Reference in New Issue
Block a user