mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
null-literal argument: testdata warnings fixed
This commit is contained in:
@@ -17,7 +17,7 @@ class Test {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static <T> T notNull(@Nullable T <warning descr="Method fails when parameter 'value' is 'null'">value</warning>) {
|
||||
private static <T> T notNull(@Nullable T value) {
|
||||
|
||||
if (value == null) {
|
||||
throw new RuntimeException("null");
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import java.util.Objects;
|
||||
|
||||
class Test {
|
||||
private static void testMethod(Object <warning descr="Method fails when parameter 'o' is 'null'">o</warning>, Object o2, Object <warning descr="Method fails when parameter 'o3' is 'null'">o3</warning>, Object o4, int i) {
|
||||
private static void testMethod(Object <warning descr="Method will throw an exception when parameter is null">o</warning>, Object o2, Object <warning descr="Method will throw an exception when parameter is null">o3</warning>, Object o4, int i) {
|
||||
Objects.requireNonNull(o, "o is not null");
|
||||
if (o3 != null) {
|
||||
System.out.println(o3.hashCode());
|
||||
|
||||
Reference in New Issue
Block a user