ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jsr166e/CompletableFuture.java
(Generate patch)

Comparing jsr166/src/jsr166e/CompletableFuture.java (file contents):
Revision 1.1 by dl, Wed Jan 2 14:13:12 2013 UTC vs.
Revision 1.2 by dl, Wed Jan 2 17:37:14 2013 UTC

# Line 403 | Line 403 | public class CompletableFuture<T> implem
403          }
404          public final boolean exec() {
405              CompletableFuture<Void> d; Throwable ex;
406 <            if ((d = this.dst) != null) {
406 >            if ((d = this.dst) != null && d.result == null) {
407                  try {
408                      fn.run();
409                      ex = null;
# Line 425 | Line 425 | public class CompletableFuture<T> implem
425          }
426          public final boolean exec() {
427              CompletableFuture<U> d; U u; Throwable ex;
428 <            if ((d = this.dst) != null) {
428 >            if ((d = this.dst) != null && d.result == null) {
429                  try {
430                      u = fn.get();
431                      ex = null;
# Line 450 | Line 450 | public class CompletableFuture<T> implem
450          }
451          public final boolean exec() {
452              CompletableFuture<U> d; U u; Throwable ex;
453 <            if ((d = this.dst) != null) {
453 >            if ((d = this.dst) != null && d.result == null) {
454                  try {
455                      u = fn.apply(arg);
456                      ex = null;
# Line 477 | Line 477 | public class CompletableFuture<T> implem
477          }
478          public final boolean exec() {
479              CompletableFuture<V> d; V v; Throwable ex;
480 <            if ((d = this.dst) != null) {
480 >            if ((d = this.dst) != null && d.result == null) {
481                  try {
482                      v = fn.apply(arg1, arg2);
483                      ex = null;
# Line 502 | Line 502 | public class CompletableFuture<T> implem
502          }
503          public final boolean exec() {
504              CompletableFuture<Void> d; Throwable ex;
505 <            if ((d = this.dst) != null) {
505 >            if ((d = this.dst) != null && d.result == null) {
506                  try {
507                      fn.accept(arg);
508                      ex = null;
# Line 528 | Line 528 | public class CompletableFuture<T> implem
528          }
529          public final boolean exec() {
530              CompletableFuture<Void> d; Throwable ex;
531 <            if ((d = this.dst) != null) {
531 >            if ((d = this.dst) != null && d.result == null) {
532                  try {
533                      fn.accept(arg1, arg2);
534                      ex = null;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines