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() { |