Skip to content

Commit 7d42628

Browse files
vanniktechakarnokd
authored andcommitted
1.x: Fix some typos (#4234)
1 parent 791379d commit 7d42628

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

src/main/java/rx/Completable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,7 @@ public final Completable onErrorComplete() {
16601660
/**
16611661
* Returns a Completable instance that if this Completable emits an error and the predicate returns
16621662
* true, it will emit an onComplete and swallow the throwable.
1663-
* @param predicate the predicate to call when an Throwable is emitted which should return true
1663+
* @param predicate the predicate to call when a Throwable is emitted which should return true
16641664
* if the Throwable should be swallowed and replaced with an onComplete.
16651665
* @return the new Completable instance
16661666
*/

src/main/java/rx/Single.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,9 @@ private Single<Observable<T>> nest() {
266266
*
267267
* @param <T> the common value type
268268
* @param t1
269-
* an Single to be concatenated
269+
* a Single to be concatenated
270270
* @param t2
271-
* an Single to be concatenated
271+
* a Single to be concatenated
272272
* @return an Observable that emits items emitted by the two source Singles, one after the other.
273273
* @see <a href="http://reactivex.io/documentation/operators/concat.html">ReactiveX operators documentation: Concat</a>
274274
*/
@@ -1504,7 +1504,7 @@ public final Single<T> onErrorReturn(Func1<Throwable, ? extends T> resumeFunctio
15041504
* By default, when a Single encounters an error that prevents it from emitting the expected item to
15051505
* its {@link Observer}, the Single invokes its Observer's {@code onError} method, and then quits
15061506
* without invoking any more of its Observer's methods. The {@code onErrorResumeNext} method changes this
1507-
* behavior. If you pass another Single ({@code resumeSingleInCaseOfError}) to an Single's
1507+
* behavior. If you pass another Single ({@code resumeSingleInCaseOfError}) to a Single's
15081508
* {@code onErrorResumeNext} method, if the original Single encounters an error, instead of invoking its
15091509
* Observer's {@code onError} method, it will instead relinquish control to {@code resumeSingleInCaseOfError} which
15101510
* will invoke the Observer's {@link Observer#onNext onNext} method if it is able to do so. In such a case,
@@ -1538,7 +1538,7 @@ public final Single<T> onErrorResumeNext(Single<? extends T> resumeSingleInCaseO
15381538
* By default, when a Single encounters an error that prevents it from emitting the expected item to
15391539
* its {@link Observer}, the Single invokes its Observer's {@code onError} method, and then quits
15401540
* without invoking any more of its Observer's methods. The {@code onErrorResumeNext} method changes this
1541-
* behavior. If you pass a function that will return another Single ({@code resumeFunctionInCaseOfError}) to an Single's
1541+
* behavior. If you pass a function that will return another Single ({@code resumeFunctionInCaseOfError}) to a Single's
15421542
* {@code onErrorResumeNext} method, if the original Single encounters an error, instead of invoking its
15431543
* Observer's {@code onError} method, it will instead relinquish control to {@code resumeSingleInCaseOfError} which
15441544
* will invoke the Observer's {@link Observer#onNext onNext} method if it is able to do so. In such a case,
@@ -2452,7 +2452,7 @@ public final Single<T> doOnSubscribe(final Action0 subscribe) {
24522452
}
24532453

24542454
/**
2455-
* Returns an Single that emits the items emitted by the source Single shifted forward in time by a
2455+
* Returns a Single that emits the items emitted by the source Single shifted forward in time by a
24562456
* specified delay. Error notifications from the source Single are not delayed.
24572457
* <p>
24582458
* <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/delay.s.png" alt="">
@@ -2476,7 +2476,7 @@ public final Single<T> delay(long delay, TimeUnit unit, Scheduler scheduler) {
24762476
}
24772477

24782478
/**
2479-
* Returns an Single that emits the items emitted by the source Single shifted forward in time by a
2479+
* Returns a Single that emits the items emitted by the source Single shifted forward in time by a
24802480
* specified delay. Error notifications from the source Observable are not delayed.
24812481
* <p>
24822482
* <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/delay.png" alt="">
@@ -2646,7 +2646,7 @@ public final Single<T> retry() {
26462646
}
26472647

26482648
/**
2649-
* Returns an Single that mirrors the source Single, resubscribing to it if it calls {@code onError}
2649+
* Returns a Single that mirrors the source Single, resubscribing to it if it calls {@code onError}
26502650
* up to a specified number of retries.
26512651
*
26522652
* <img width="640" height="315" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/retry.png" alt="">
@@ -2671,7 +2671,7 @@ public final Single<T> retry(final long count) {
26712671
}
26722672

26732673
/**
2674-
* Returns an Single that mirrors the source Single, resubscribing to it if it calls {@code onError}
2674+
* Returns a Single that mirrors the source Single, resubscribing to it if it calls {@code onError}
26752675
* and the predicate returns true for that specific exception and retry count.
26762676
*
26772677
* <img width="640" height="315" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/retry.png" alt="">
@@ -2739,7 +2739,7 @@ public final Single<T> retryWhen(final Func1<Observable<? extends Throwable>, ?
27392739
}
27402740

27412741
/**
2742-
* Constructs an Single that creates a dependent resource object which is disposed of on unsubscription.
2742+
* Constructs a Single that creates a dependent resource object which is disposed of on unsubscription.
27432743
* <p>
27442744
* <img width="640" height="400" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/using.png" alt="">
27452745
* <dl>
@@ -2767,7 +2767,7 @@ public static <T, Resource> Single<T> using(
27672767
}
27682768

27692769
/**
2770-
* Constructs an Single that creates a dependent resource object which is disposed of just before
2770+
* Constructs a Single that creates a dependent resource object which is disposed of just before
27712771
* termination if you have set {@code disposeEagerly} to {@code true} and unsubscription does not occur
27722772
* before termination. Otherwise resource disposal will occur on unsubscription. Eager disposal is
27732773
* particularly appropriate for a synchronous Single that reuses resources. {@code disposeAction} will

src/main/java/rx/internal/operators/OnSubscribeToObservableFuture.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public void call() {
7474
T value = (unit == null) ? (T) that.get() : (T) that.get(time, unit);
7575
subscriber.setProducer(new SingleProducer<T>(subscriber, value));
7676
} catch (Throwable e) {
77-
// If this Observable is unsubscribed, we will receive an CancellationException.
77+
// If this Observable is unsubscribed, we will receive a CancellationException.
7878
// However, CancellationException will not be passed to the final Subscriber
7979
// since it's already subscribed.
8080
// If the Future is canceled in other place, CancellationException will be still

src/main/java/rx/plugins/RxJavaHooks.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ public static Func1<Operator, Operator> getOnSingleLift() {
967967
}
968968

969969
/**
970-
* Sets a hook function that is called with an operator when an Completable operator built with
970+
* Sets a hook function that is called with an operator when a Completable operator built with
971971
* lift() gets subscribed to.
972972
* <p>
973973
* This operation is threadsafe.

src/test/java/rx/ZipTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public void testCovarianceOfZip() {
102102
* Occasionally zip may be invoked with 0 observables. Test that we don't block indefinitely instead
103103
* of immediately invoking zip with 0 argument.
104104
*
105-
* We now expect an NoSuchElementException since last() requires at least one value and nothing will be emitted.
105+
* We now expect a NoSuchElementException since last() requires at least one value and nothing will be emitted.
106106
*/
107107
@Test(expected = NoSuchElementException.class)
108108
public void nonBlockingObservable() {

src/test/java/rx/internal/operators/BlockingOperatorNextTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public void testNextWithError() {
113113
fireOnErrorInNewThread(obs);
114114
try {
115115
it.hasNext();
116-
fail("Expected an TestException");
116+
fail("Expected a TestException");
117117
} catch (TestException e) {
118118
}
119119

@@ -149,7 +149,7 @@ public void testOnError() throws Throwable {
149149
obs.onError(new TestException());
150150
try {
151151
it.hasNext();
152-
fail("Expected an TestException");
152+
fail("Expected a TestException");
153153
} catch (TestException e) {
154154
// successful
155155
}
@@ -166,7 +166,7 @@ public void testOnErrorInNewThread() {
166166

167167
try {
168168
it.hasNext();
169-
fail("Expected an TestException");
169+
fail("Expected a TestException");
170170
} catch (TestException e) {
171171
// successful
172172
}

0 commit comments

Comments
 (0)