@Test(expected = TestRuntimeException.class) public void testCallableRethrows() { Exceptions.rethrow(() -> new TestRuntimeException()); }
public static <T> T rethrow(Throwable e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } else if (e instanceof Error) { throw (Error) e; } else { throw new UncheckedException(e); } }
Exceptions { public static <T> T rethrow(Throwable e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } else if (e instanceof Error) { throw (Error) e; } else { throw new UncheckedException(e); } } }
Exceptions { public static <T> T rethrow(Throwable e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } else if (e instanceof Error) { throw (Error) e; } else { throw new UncheckedException(e); } } private  Exceptions(); }
Exceptions { public static <T> T rethrow(Throwable e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } else if (e instanceof Error) { throw (Error) e; } else { throw new UncheckedException(e); } } private  Exceptions(); static T rethrow(Throwable e); static T rethrow(Callable<? extends Throwable> callable); }
Exceptions { public static <T> T rethrow(Throwable e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } else if (e instanceof Error) { throw (Error) e; } else { throw new UncheckedException(e); } } private  Exceptions(); static T rethrow(Throwable e); static T rethrow(Callable<? extends Throwable> callable);  }