- return Futures.makeChecked(transformed, new Function<Exception, DOMRpcException>() {
- @Nullable
- @Override
- public DOMRpcException apply(@Nullable final Exception e) {
- // FIXME what other possible exceptions are there ?
- return new DOMRpcImplementationNotAvailableException(e, "Unable to invoke rpc %s", type);
- }
- });
+ return Futures.makeChecked(transformed, exception ->
+ new DOMRpcImplementationNotAvailableException(exception, "Unable to invoke rpc %s", type));