Skip to content

1.x: Fix some typos #4234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/rx/Completable.java
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,7 @@ public final Completable onErrorComplete() {
/**
* Returns a Completable instance that if this Completable emits an error and the predicate returns
* true, it will emit an onComplete and swallow the throwable.
* @param predicate the predicate to call when an Throwable is emitted which should return true
* @param predicate the predicate to call when a Throwable is emitted which should return true
* if the Throwable should be swallowed and replaced with an onComplete.
* @return the new Completable instance
*/
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/rx/Single.java
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,9 @@ private Single<Observable<T>> nest() {
*
* @param <T> the common value type
* @param t1
* an Single to be concatenated
* a Single to be concatenated
* @param t2
* an Single to be concatenated
* a Single to be concatenated
* @return an Observable that emits items emitted by the two source Singles, one after the other.
* @see <a href="http://reactivex.io/documentation/operators/concat.html">ReactiveX operators documentation: Concat</a>
*/
Expand Down Expand Up @@ -1504,7 +1504,7 @@ public final Single<T> onErrorReturn(Func1<Throwable, ? extends T> resumeFunctio
* By default, when a Single encounters an error that prevents it from emitting the expected item to
* its {@link Observer}, the Single invokes its Observer's {@code onError} method, and then quits
* without invoking any more of its Observer's methods. The {@code onErrorResumeNext} method changes this
* behavior. If you pass another Single ({@code resumeSingleInCaseOfError}) to an Single's
* behavior. If you pass another Single ({@code resumeSingleInCaseOfError}) to a Single's
* {@code onErrorResumeNext} method, if the original Single encounters an error, instead of invoking its
* Observer's {@code onError} method, it will instead relinquish control to {@code resumeSingleInCaseOfError} which
* will invoke the Observer's {@link Observer#onNext onNext} method if it is able to do so. In such a case,
Expand Down Expand Up @@ -1538,7 +1538,7 @@ public final Single<T> onErrorResumeNext(Single<? extends T> resumeSingleInCaseO
* By default, when a Single encounters an error that prevents it from emitting the expected item to
* its {@link Observer}, the Single invokes its Observer's {@code onError} method, and then quits
* without invoking any more of its Observer's methods. The {@code onErrorResumeNext} method changes this
* behavior. If you pass a function that will return another Single ({@code resumeFunctionInCaseOfError}) to an Single's
* behavior. If you pass a function that will return another Single ({@code resumeFunctionInCaseOfError}) to a Single's
* {@code onErrorResumeNext} method, if the original Single encounters an error, instead of invoking its
* Observer's {@code onError} method, it will instead relinquish control to {@code resumeSingleInCaseOfError} which
* will invoke the Observer's {@link Observer#onNext onNext} method if it is able to do so. In such a case,
Expand Down Expand Up @@ -2452,7 +2452,7 @@ public final Single<T> doOnSubscribe(final Action0 subscribe) {
}

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

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

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

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

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

/**
* Constructs an Single that creates a dependent resource object which is disposed of just before
* Constructs a Single that creates a dependent resource object which is disposed of just before
* termination if you have set {@code disposeEagerly} to {@code true} and unsubscription does not occur
* before termination. Otherwise resource disposal will occur on unsubscription. Eager disposal is
* particularly appropriate for a synchronous Single that reuses resources. {@code disposeAction} will
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void call() {
T value = (unit == null) ? (T) that.get() : (T) that.get(time, unit);
subscriber.setProducer(new SingleProducer<T>(subscriber, value));
} catch (Throwable e) {
// If this Observable is unsubscribed, we will receive an CancellationException.
// If this Observable is unsubscribed, we will receive a CancellationException.
// However, CancellationException will not be passed to the final Subscriber
// since it's already subscribed.
// If the Future is canceled in other place, CancellationException will be still
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/rx/plugins/RxJavaHooks.java
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ public static Func1<Operator, Operator> getOnSingleLift() {
}

/**
* Sets a hook function that is called with an operator when an Completable operator built with
* Sets a hook function that is called with an operator when a Completable operator built with
* lift() gets subscribed to.
* <p>
* This operation is threadsafe.
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/rx/ZipTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void testCovarianceOfZip() {
* Occasionally zip may be invoked with 0 observables. Test that we don't block indefinitely instead
* of immediately invoking zip with 0 argument.
*
* We now expect an NoSuchElementException since last() requires at least one value and nothing will be emitted.
* We now expect a NoSuchElementException since last() requires at least one value and nothing will be emitted.
*/
@Test(expected = NoSuchElementException.class)
public void nonBlockingObservable() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void testNextWithError() {
fireOnErrorInNewThread(obs);
try {
it.hasNext();
fail("Expected an TestException");
fail("Expected a TestException");
} catch (TestException e) {
}

Expand Down Expand Up @@ -149,7 +149,7 @@ public void testOnError() throws Throwable {
obs.onError(new TestException());
try {
it.hasNext();
fail("Expected an TestException");
fail("Expected a TestException");
} catch (TestException e) {
// successful
}
Expand All @@ -166,7 +166,7 @@ public void testOnErrorInNewThread() {

try {
it.hasNext();
fail("Expected an TestException");
fail("Expected a TestException");
} catch (TestException e) {
// successful
}
Expand Down