mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
[java-analysis] Do not apply container annotation to local variables if their type is a bounded type parameter
Fixes IDEA-362982 JSpecify: Local variable incorrectly asserted as NotNull with generics GitOrigin-RevId: c310d57d875b4f63370daf0b77caece902681a06
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3ac1ccb7ea
commit
b9cd1e1a86
@@ -0,0 +1,15 @@
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@NullMarked
|
||||
class LocalsWithGenericsNullness {
|
||||
public <R extends Serializable> @Nullable R fetchOne() {
|
||||
throw new UnsupportedOperationException("Not relevant");
|
||||
}
|
||||
|
||||
public <R extends Serializable> void fetchOneDelegate() {
|
||||
R record = fetchOne();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user