/* * @test /nodynamiccopyright/ * @bug 8230105 * @summary Verify the analyzers work reasonably for stuck lambdas * @compile/ref=StuckLambdas.out -XDfind=local -XDrawDiagnostics StuckLambdas.java */ import java.util.Map; import java.util.concurrent.ExecutorService; import java.util.function.*; import java.util.stream.*; abstract class X { public interface N { Stream getValues(); } abstract N c(); abstract > Collector f( Function k, Function> v, Supplier multimapSupplier); void m(Map> c, ExecutorService s) { s.submit(() -> { String s1 = ""; return c.entrySet() .parallelStream() .collect(f(Map.Entry::getKey, e -> {String s2 = ""; return e.getValue().getValues();}, this::c)); }); } }