[java-inspections] NullableStuffInspectionBase: fix record constructor support

GitOrigin-RevId: defcd306c9f5a32c027cbc2105ac3224878de452
This commit is contained in:
Tagir Valeev
2024-06-21 16:20:44 +02:00
committed by intellij-monorepo-bot
parent bf4cebe086
commit b038d3db65
3 changed files with 22 additions and 1 deletions

View File

@@ -22,11 +22,26 @@ class Main111 {
record MyRecord(<warning descr="Parameter annotated @NotNull should not receive 'null' as an argument">@NotNull</warning> Object o,
@NotNull Object o2) {}
record MyRecord2(<warning descr="Parameter annotated @NotNull should not receive 'null' as an argument">@NotNull</warning> Object o,
@NotNull Object o2) {
MyRecord2 {
}
}
record MyRecord3(@NotNull Object o, @NotNull Object o2) {
MyRecord3(<warning descr="Parameter annotated @NotNull should not receive 'null' as an argument">@NotNull</warning> Object o, @NotNull Object o2) {
this.o = o;
this.o2 = o2;
}
}
static void main() {
new Main111(null);
new Main111.SubClass(null);
new SubClass2(null);
new MyRecord(null, "");
new MyRecord2(null, "");
new MyRecord3(null, "");
new ParamerizedRunnable(null) {
@Override