@Test(expected = InternalError.class) public void invokeOnWithException() throws Exception { final MethodHandle methodHandle = MethodHandles.lookup().unreflect( TestImplClassWithoutInput.class.getDeclaredMethod("testMethodWithException", RpcService.class)); final RpcMethodInvokerWithoutInput invokerWithoutInput = new RpcMethodInvokerWithoutInput(methodHandle); invokerWithoutInput.invokeOn(TEST_IMPL_CLASS, null); }
@Override @SuppressWarnings("checkstyle:illegalCatch") ListenableFuture<RpcResult<?>> invokeOn(final RpcService impl, final DataObject input) { try { return (ListenableFuture<RpcResult<?>>) handle.invokeExact(impl); } catch (Throwable e) { Throwables.throwIfUnchecked(e); throw new IllegalStateException(e); } }
RpcMethodInvokerWithoutInput extends RpcMethodInvoker { @Override @SuppressWarnings("checkstyle:illegalCatch") ListenableFuture<RpcResult<?>> invokeOn(final RpcService impl, final DataObject input) { try { return (ListenableFuture<RpcResult<?>>) handle.invokeExact(impl); } catch (Throwable e) { Throwables.throwIfUnchecked(e); throw new IllegalStateException(e); } } }
RpcMethodInvokerWithoutInput extends RpcMethodInvoker { @Override @SuppressWarnings("checkstyle:illegalCatch") ListenableFuture<RpcResult<?>> invokeOn(final RpcService impl, final DataObject input) { try { return (ListenableFuture<RpcResult<?>>) handle.invokeExact(impl); } catch (Throwable e) { Throwables.throwIfUnchecked(e); throw new IllegalStateException(e); } } RpcMethodInvokerWithoutInput(final MethodHandle methodHandle); }
RpcMethodInvokerWithoutInput extends RpcMethodInvoker { @Override @SuppressWarnings("checkstyle:illegalCatch") ListenableFuture<RpcResult<?>> invokeOn(final RpcService impl, final DataObject input) { try { return (ListenableFuture<RpcResult<?>>) handle.invokeExact(impl); } catch (Throwable e) { Throwables.throwIfUnchecked(e); throw new IllegalStateException(e); } } RpcMethodInvokerWithoutInput(final MethodHandle methodHandle);  }
RpcMethodInvokerWithoutInput extends RpcMethodInvoker { @Override @SuppressWarnings("checkstyle:illegalCatch") ListenableFuture<RpcResult<?>> invokeOn(final RpcService impl, final DataObject input) { try { return (ListenableFuture<RpcResult<?>>) handle.invokeExact(impl); } catch (Throwable e) { Throwables.throwIfUnchecked(e); throw new IllegalStateException(e); } } RpcMethodInvokerWithoutInput(final MethodHandle methodHandle);   }