/* * @test /nodynamiccopyright/ * @bug 8171325 * @summary NPE in Check.clearLocalClassNameIndexes * @compile/fail/ref=NPEClearingLocalClassNameIndexesTest.out -XDrawDiagnostics NPEClearingLocalClassNameIndexesTest.java */ import java.util.List; import java.util.function.Function; import java.util.function.Supplier; public class NPEClearingLocalClassNameIndexesTest { void f(List t) {} C g(C u, Function v) { return null; } D g(Supplier w) { return null; } public void test() { f(g((String) null, task -> g(new NoSuch() {}))); f(g((String) null, task -> g(new NoSuch() {}))); } }