ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/Flow.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/Flow.java (file contents):
Revision 1.20 by jsr166, Sat Jan 24 18:50:40 2015 UTC vs.
Revision 1.21 by dl, Sat Jan 24 20:58:59 2015 UTC

# Line 63 | Line 63 | import java.util.stream.Stream;
63   *     public synchronized void request(long n) {
64   *       if (n != 0 && !completed) {
65   *         completed = true;
66 < *         future = executor.submit(() -> {
67 < *           if (n < 0)
68 < *             subscriber.onError(new IllegalArgumentException());
69 < *           else {
66 > *         if (n < 0) {
67 > *           IllegalStateException ex = new IllegalStateException();
68 > *           executor.submit(() -> subscriber.onError(ex));
69 > *         }
70 > *         else {
71 > *           future = executor.submit(() -> {
72   *             subscriber.onNext(Boolean.TRUE);
73   *             subscriber.onComplete();
74 < *           }});
74 > *           });
75 > *         }
76   *       }
77   *     }
78   *     public synchronized void cancel() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines