I am using io.vavr.control.Try and try to do Try.run but I can't use method reference with parameter. How can I fix this?
PingRequest pingRequest = new PingRequest();
PingCall pingCall = this.client.newPingCall();
//Try<Void> attempt = Try.run(pinCall::call); //A: this will work if call is a no parameter method
//Try<Void> attempt = Try.run(pinCall.call(pingRequest)); //B: I want to call it with parameter but obvious it can't: Required type: CheckedRunnable
Try<Void> attempt = Try.run(() -> pingCall.call(pingRequest)); //C: Idea pass this way, but I don't know if it's correct
attempt.onSuccess...
public PingResponse call(PingRequest input) throws InternalError {...}