import java.io.IOException; class Test { interface ThrowableRunnable { void run() throws T; } interface ThrowableComputable { R compute() throws E; } private void doTest(ThrowableRunnable action) { } public void testNoNotificationForWorkspace() { doTest(() -> computeAndWait(() -> foo())); } private String foo() throws IOException { return null; } public static R computeAndWait(ThrowableComputable action) throws E { return null; } } class TestWithImplicitLambda { interface ThrowableRunnable { void run(int k) throws T; } interface ThrowableComputable { R compute() throws E; } private void doTest(ThrowableRunnable action) { } public void testNoNotificationForWorkspace() { doTest((k) -> computeAndWait(() -> foo())); } private String foo() throws IOException { return null; } public static R computeAndWait(ThrowableComputable action) throws E { return null; } }