avoid var in ClientHook

This commit is contained in:
Vaci Koblizek 2022-03-06 16:47:37 +00:00
parent 3ec3dbae57
commit 7c521d5840

View file

@ -61,7 +61,7 @@ public interface ClientHook {
* Repeatedly calls whenMoreResolved() until it returns nullptr. * Repeatedly calls whenMoreResolved() until it returns nullptr.
*/ */
default CompletableFuture<java.lang.Void> whenResolved() { default CompletableFuture<java.lang.Void> whenResolved() {
var promise = whenMoreResolved(); CompletableFuture<ClientHook> promise = whenMoreResolved();
return promise != null return promise != null
? promise.thenCompose(ClientHook::whenResolved) ? promise.thenCompose(ClientHook::whenResolved)
: CompletableFuture.completedFuture(null); : CompletableFuture.completedFuture(null);
@ -83,7 +83,7 @@ public interface ClientHook {
} }
/** /**
* Implements {@link Capability.Client.getFd}. If this returns null but whenMoreResolved() returns * Implements Capability.Client.getFd. If this returns null but whenMoreResolved() returns
* non-null, then Capability::Client::getFd() waits for resolution and tries again. * non-null, then Capability::Client::getFd() waits for resolution and tries again.
*/ */
default FileDescriptor getFd() { default FileDescriptor getFd() {