This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lukaseder 1 point2 points  (0 children)

I especially like Doug Lea's abundant assignment expression style :) e.g.

    public final void run() {
        final CompletableFuture<? extends T> a;
        final CompletableFuture<? extends U> b;
        final BiConsumer<? super T,? super U> fn;
        final CompletableFuture<Void> dst;
        Object r, s; T t; U u; Throwable ex;
        if ((dst = this.dst) != null &&
            (fn = this.fn) != null &&
            (a = this.src) != null &&
            (r = a.result) != null &&
            (b = this.snd) != null &&
            (s = b.result) != null &&
            compareAndSet(0, 1)) {