aoqi@0: /* aoqi@0: * @test /nodynamiccopyright/ aoqi@0: * @bug 8019521 aoqi@0: * @summary Check that enhanced rethrow/effectivelly final works correctly inside lambdas aoqi@0: * @compile EffectivelyFinalThrows.java aoqi@0: */ aoqi@0: aoqi@0: class EffectivelyFinalThrows { aoqi@0: interface SAM { aoqi@0: public void t() throws E; aoqi@0: } aoqi@0: void test(SAM s) throws E { aoqi@0: s.t(); aoqi@0: } aoqi@0: void test2(SAM s) throws Checked { aoqi@0: test(() -> { aoqi@0: try { aoqi@0: s.t(); aoqi@0: } catch (Throwable t) { aoqi@0: throw t; aoqi@0: } aoqi@0: }); aoqi@0: } aoqi@0: static class Checked extends Exception {} aoqi@0: }