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