Files
openide/java/java-tests/testData/inspection/dataFlow/fixture/CompletableFutureWhenComplete.java
Tagir Valeev b50767f679 [java] Basic support for external type annotations
Only in XML directly; no editing UI for now; no inlays for now; only for libraries (Cls), currently no intent to extend to sources (Psi)
Part of IDEA-231901 Support TYPE_USE in external annotations

GitOrigin-RevId: 672ed09f57ffc40b61e8fe4dd33d0f9acdac92dc
2024-09-18 20:06:30 +00:00

17 lines
359 B
Java

import java.util.concurrent.CompletableFuture;
import typeUse.*;
public class CompletableFutureWhenComplete {
native CompletableFuture<@NotNull String> supply();
void test() {
supply().whenComplete((s, t) -> {
if (t != null) {
System.out.println(t);
}
if (s != null) {
System.out.println(s);
}
});
}
}