From d9c156803a9990a73b703003bb0340b4612628ce Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Fri, 13 Mar 2015 15:23:16 -0700 Subject: [PATCH] Addresses a couple of typos in the examples for AsyncSubscriber and SyncSubscriber --- .../org/reactivestreams/example/unicast/AsyncSubscriber.java | 4 ++-- .../org/reactivestreams/example/unicast/SyncSubscriber.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/src/main/java/org/reactivestreams/example/unicast/AsyncSubscriber.java b/examples/src/main/java/org/reactivestreams/example/unicast/AsyncSubscriber.java index 321b23c3..c561b8b0 100644 --- a/examples/src/main/java/org/reactivestreams/example/unicast/AsyncSubscriber.java +++ b/examples/src/main/java/org/reactivestreams/example/unicast/AsyncSubscriber.java @@ -94,7 +94,7 @@ private final void handleOnSubscribe(final Subscription s) { s.request(1); // Our Subscriber is unbuffered and modest, it requests one element at a time } catch(final Throwable t) { // Subscription.request is not allowed to throw according to rule 3.16 - (new IllegalStateException(s + " violated the Reactive Streams rule 3.16 by throwing an exception from cancel.", t)).printStackTrace(System.err); + (new IllegalStateException(s + " violated the Reactive Streams rule 3.16 by throwing an exception from request.", t)).printStackTrace(System.err); } } } @@ -111,7 +111,7 @@ private final void handleOnNext(final T element) { subscription.request(1); // Our Subscriber is unbuffered and modest, it requests one element at a time } catch(final Throwable t) { // Subscription.request is not allowed to throw according to rule 3.16 - (new IllegalStateException(subscription + " violated the Reactive Streams rule 3.16 by throwing an exception from cancel.", t)).printStackTrace(System.err); + (new IllegalStateException(subscription + " violated the Reactive Streams rule 3.16 by throwing an exception from request.", t)).printStackTrace(System.err); } } else { done(); // This is legal according to rule 2.6 diff --git a/examples/src/main/java/org/reactivestreams/example/unicast/SyncSubscriber.java b/examples/src/main/java/org/reactivestreams/example/unicast/SyncSubscriber.java index 94759f42..a603101f 100644 --- a/examples/src/main/java/org/reactivestreams/example/unicast/SyncSubscriber.java +++ b/examples/src/main/java/org/reactivestreams/example/unicast/SyncSubscriber.java @@ -35,7 +35,7 @@ public abstract class SyncSubscriber implements Subscriber { s.request(1); // Our Subscriber is unbuffered and modest, it requests one element at a time } catch(final Throwable t) { // Subscription.request is not allowed to throw according to rule 3.16 - (new IllegalStateException(s + " violated the Reactive Streams rule 3.16 by throwing an exception from cancel.", t)).printStackTrace(System.err); + (new IllegalStateException(s + " violated the Reactive Streams rule 3.16 by throwing an exception from request.", t)).printStackTrace(System.err); } } } @@ -54,7 +54,7 @@ public abstract class SyncSubscriber implements Subscriber { subscription.request(1); // Our Subscriber is unbuffered and modest, it requests one element at a time } catch (final Throwable t) { // Subscription.request is not allowed to throw according to rule 3.16 - (new IllegalStateException(subscription + " violated the Reactive Streams rule 3.16 by throwing an exception from cancel.", t)).printStackTrace(System.err); + (new IllegalStateException(subscription + " violated the Reactive Streams rule 3.16 by throwing an exception from request.", t)).printStackTrace(System.err); } } else { done();