diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/EclipseDefaultTypeUse.java b/java/java-tests/testData/inspection/dataFlow/fixture/EclipseDefaultTypeUse.java index 08122acd2489..dbf69af7a285 100644 --- a/java/java-tests/testData/inspection/dataFlow/fixture/EclipseDefaultTypeUse.java +++ b/java/java-tests/testData/inspection/dataFlow/fixture/EclipseDefaultTypeUse.java @@ -16,4 +16,26 @@ public class EclipseDefaultTypeUse { // List::add is not annotated but ArrayList is defined in context of TYPE_USE NonNullByDefault annotation a.add(null); } +} +@NonNullByDefault +@FunctionalInterface +interface DefNotNull { + String apply(String s); +} +@FunctionalInterface +interface Plain { + String apply(String s); +} +@NonNullByDefault +class UseNotNull { + void test() { + DefNotNull l1 = s -> s == null ? "null" : s.isEmpty() ? null : s; + Plain l2 = s -> s == null ? "null" : s.isEmpty() ? null : s; + } +} +class UsePlain { + void test() { + DefNotNull l1 = s -> s == null ? "null" : s.isEmpty() ? null : s; + Plain l2 = s -> s == null ? "null" : s.isEmpty() ? null : s; + } } \ No newline at end of file