[java-inspections] Additional test for IDEA-371907

GitOrigin-RevId: ff147fcad61e443894ec716d0bd4135a6a3ad734
This commit is contained in:
Tagir Valeev
2025-05-05 12:14:54 +00:00
committed by intellij-monorepo-bot
parent 0f2d251482
commit a33b824775
@@ -14,4 +14,14 @@ class FromDemo {
List<<warning descr="Redundant nullability annotation in the scope of @NotNullByDefault">@NotNull</warning> String> param(<warning descr="Redundant nullability annotation in the scope of @NotNullByDefault">@NotNull</warning> String <warning descr="Redundant nullability annotation in the scope of @NotNullByDefault">@NotNull</warning> [] <warning descr="Redundant nullability annotation in the scope of @NotNullByDefault">@NotNull</warning> [] a) {
return List.of();
}
}
void fun() {
@Nullable String variableWhereAnnotationMakesSense = OtherClass.returnSomething();
}
}
class OtherClass {
static String returnSomething() {
return Math.random() > 0.5 ? "not null" : null;
}
}