Skip to content

Commit 26500c5

Browse files
committed
1.x: Fix typos in documentation and some code
1 parent d72a41e commit 26500c5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+104
-104
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ javadoc {
2323
options {
2424
windowTitle = "RxJava Javadoc ${project.version}"
2525
}
26-
// Clear the following options to make the docs consitent with the old format
26+
// Clear the following options to make the docs consistent with the old format
2727
options.addStringOption('top').value = ''
2828
options.addStringOption('doctitle').value = ''
2929
options.addStringOption('header').value = ''

src/main/java/rx/Completable.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ static <T> T requireNonNull(T o) {
752752
}
753753

754754
/**
755-
* Returns a Completable instance that fires its onComplete event after the given delay ellapsed.
755+
* Returns a Completable instance that fires its onComplete event after the given delay elapsed.
756756
* @param delay the delay time
757757
* @param unit the delay unit
758758
* @return the new Completable instance
@@ -762,7 +762,7 @@ public static Completable timer(long delay, TimeUnit unit) {
762762
}
763763

764764
/**
765-
* Returns a Completable instance that fires its onComplete event after the given delay ellapsed
765+
* Returns a Completable instance that fires its onComplete event after the given delay elapsed
766766
* by using the supplied scheduler.
767767
* @param delay the delay time
768768
* @param unit the delay unit
@@ -1040,7 +1040,7 @@ public void onSubscribe(Subscription d) {
10401040
* @param timeout the timeout value
10411041
* @param unit the timeout unit
10421042
* @return true if the this Completable instance completed normally within the time limit,
1043-
* false if the timeout ellapsed before this Completable terminated.
1043+
* false if the timeout elapsed before this Completable terminated.
10441044
* @throws RuntimeException wrapping an InterruptedException if the current thread is interrupted
10451045
*/
10461046
public final boolean await(long timeout, TimeUnit unit) {
@@ -1239,7 +1239,7 @@ public final Completable doOnCompleted(Action0 onCompleted) {
12391239
}
12401240

12411241
/**
1242-
* Returns a Completable which calls the giveon onUnsubscribe callback if the child subscriber cancels
1242+
* Returns a Completable which calls the given onUnsubscribe callback if the child subscriber cancels
12431243
* the subscription.
12441244
* @param onUnsubscribe the callback to call when the child subscriber cancels the subscription
12451245
* @return the new Completable instance
@@ -1395,7 +1395,7 @@ public final <T> Observable<T> endWith(Observable<T> next) {
13951395
}
13961396

13971397
/**
1398-
* Returns a Completable instace that calls the given onAfterComplete callback after this
1398+
* Returns a Completable instance that calls the given onAfterComplete callback after this
13991399
* Completable completes normally.
14001400
* @param onAfterComplete the callback to call after this Completable emits an onComplete event.
14011401
* @return the new Completable instance
@@ -1448,10 +1448,10 @@ public void onSubscribe(Subscription d) {
14481448

14491449
/**
14501450
* Subscribes to this Completable instance and blocks until it terminates or the specified timeout
1451-
* ellapses, then returns null for normal termination or the emitted exception if any.
1451+
* elapses, then returns null for normal termination or the emitted exception if any.
14521452
* @return the throwable if this terminated with an error, null otherwise
14531453
* @throws RuntimeException that wraps an InterruptedException if the wait is interrupted or
1454-
* TimeoutException if the specified timeout ellapsed before it
1454+
* TimeoutException if the specified timeout elapsed before it
14551455
*/
14561456
public final Throwable get(long timeout, TimeUnit unit) {
14571457
requireNonNull(unit);
@@ -2128,7 +2128,7 @@ public void call(Subscriber<? super T> s) {
21282128
}
21292129

21302130
/**
2131-
* Convers this Completable into a Single which when this Completable completes normally,
2131+
* Converts this Completable into a Single which when this Completable completes normally,
21322132
* calls the given supplier and emits its returned value through onSuccess.
21332133
* @param completionValueFunc0 the value supplier called when this Completable completes normally
21342134
* @return the new Single instance
@@ -2175,7 +2175,7 @@ public void onSubscribe(Subscription d) {
21752175
}
21762176

21772177
/**
2178-
* Convers this Completable into a Single which when this Completable completes normally,
2178+
* Converts this Completable into a Single which when this Completable completes normally,
21792179
* emits the given value through onSuccess.
21802180
* @param completionValue the value to emit when this Completable completes normally
21812181
* @return the new Single instance

src/main/java/rx/Observable.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public static <T> Observable<T> create(OnSubscribe<T> f) {
102102
*
103103
* <p><b>Note:</b> the {@code SyncOnSubscribe} provides a generic way to fulfill data by iterating
104104
* over a (potentially stateful) function (e.g. reading data off of a channel, a parser, ). If your
105-
* data comes directly from an asyrchronous/potentially concurrent source then consider using the
105+
* data comes directly from an asynchronous/potentially concurrent source then consider using the
106106
* {@link Observable#create(AsyncOnSubscribe) asynchronous overload}.
107107
*
108108
* <p>
@@ -3052,7 +3052,7 @@ public static <T, Resource> Observable<T> using(
30523052
* Constructs an Observable that creates a dependent resource object which is disposed of just before
30533053
* termination if you have set {@code disposeEagerly} to {@code true} and unsubscription does not occur
30543054
* before termination. Otherwise resource disposal will occur on unsubscription. Eager disposal is
3055-
* particularly appropriate for a synchronous Observable that resuses resources. {@code disposeAction} will
3055+
* particularly appropriate for a synchronous Observable that reuses resources. {@code disposeAction} will
30563056
* only be called once per subscription.
30573057
* <p>
30583058
* <img width="640" height="400" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/using.png" alt="">
@@ -3094,7 +3094,7 @@ public static <T, Resource> Observable<T> using(
30943094
* item emitted by each of those Observables; and so forth.
30953095
* <p>
30963096
* The resulting {@code Observable<R>} returned from {@code zip} will invoke {@code onNext} as many times as
3097-
* the number of {@code onNext} invokations of the source Observable that emits the fewest items.
3097+
* the number of {@code onNext} invocations of the source Observable that emits the fewest items.
30983098
* <p>
30993099
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/zip.png" alt="">
31003100
* <dl>
@@ -3128,7 +3128,7 @@ public static <R> Observable<R> zip(Iterable<? extends Observable<?>> ws, FuncN<
31283128
* function applied to the second item emitted by each of those Observables; and so forth.
31293129
* <p>
31303130
* The resulting {@code Observable<R>} returned from {@code zip} will invoke {@code onNext} as many times as
3131-
* the number of {@code onNext} invokations of the source Observable that emits the fewest items.
3131+
* the number of {@code onNext} invocations of the source Observable that emits the fewest items.
31323132
* <p>
31333133
* <img width="640" height="370" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/zip.o.png" alt="">
31343134
* <dl>
@@ -3900,7 +3900,7 @@ public final <B> Observable<List<T>> buffer(Observable<B> boundary, int initialC
39003900
* subscribe/unsubscribe behavior of all the {@link Subscriber}s.
39013901
* <p>
39023902
* When you call {@code cache}, it does not yet subscribe to the source Observable and so does not yet
3903-
* begin cacheing items. This only happens when the first Subscriber calls the resulting Observable's
3903+
* begin caching items. This only happens when the first Subscriber calls the resulting Observable's
39043904
* {@code subscribe} method.
39053905
* <p>
39063906
* <em>Note:</em> You sacrifice the ability to unsubscribe from the origin when you use the {@code cache}
@@ -3943,7 +3943,7 @@ public final Observable<T> cache(int initialCapacity) {
39433943
* subscribe/unsubscribe behavior of all the {@link Subscriber}s.
39443944
* <p>
39453945
* When you call {@code cache}, it does not yet subscribe to the source Observable and so does not yet
3946-
* begin cacheing items. This only happens when the first Subscriber calls the resulting Observable's
3946+
* begin caching items. This only happens when the first Subscriber calls the resulting Observable's
39473947
* {@code subscribe} method.
39483948
* <p>
39493949
* <em>Note:</em> You sacrifice the ability to unsubscribe from the origin when you use the {@code cache}
@@ -4367,7 +4367,7 @@ public final Observable<T> switchIfEmpty(Observable<? extends T> alternate) {
43674367
}
43684368

43694369
/**
4370-
* Returns an Observable that delays the subscription to and emissions from the souce Observable via another
4370+
* Returns an Observable that delays the subscription to and emissions from the source Observable via another
43714371
* Observable on a per-item basis.
43724372
* <p>
43734373
* <img width="640" height="450" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/delay.oo.png" alt="">
@@ -5357,7 +5357,7 @@ public final <R> Observable<R> concatMapEager(Func1<? super T, ? extends Observa
53575357

53585358
/**
53595359
* Returns an Observable that emits the single item at a specified index in a sequence of emissions from a
5360-
* source Observbable.
5360+
* source Observable.
53615361
* <p>
53625362
* <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/elementAt.png" alt="">
53635363
* <dl>
@@ -5821,7 +5821,7 @@ public final <R> Observable<R> flatMapIterable(Func1<? super T, ? extends Iterab
58215821
* @param <U>
58225822
* the collection element type
58235823
* @param <R>
5824-
* the type of item emited by the resulting Observable
5824+
* the type of item emitted by the resulting Observable
58255825
* @param collectionSelector
58265826
* a function that returns an Iterable sequence of values for each item emitted by the source
58275827
* Observable
@@ -5851,7 +5851,7 @@ public final <U, R> Observable<R> flatMapIterable(Func1<? super T, ? extends Ite
58515851
* @param <U>
58525852
* the collection element type
58535853
* @param <R>
5854-
* the type of item emited by the resulting Observable
5854+
* the type of item emitted by the resulting Observable
58555855
* @param collectionSelector
58565856
* a function that returns an Iterable sequence of values for each item emitted by the source
58575857
* Observable
@@ -6813,7 +6813,7 @@ public final Observable<T> reduce(Func2<T, T, T> accumulator) {
68136813
* <p>
68146814
* <img width="640" height="325" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/reduceSeed.png" alt="">
68156815
* <p>
6816-
* This technique, which is called "reduce" here, is sometimec called "aggregate," "fold," "accumulate,"
6816+
* This technique, which is called "reduce" here, is sometimes called "aggregate," "fold," "accumulate,"
68176817
* "compress," or "inject" in other programming contexts. Groovy, for instance, has an {@code inject} method
68186818
* that does a similar operation on lists.
68196819
* <dl>
@@ -10355,7 +10355,7 @@ public final Observable<Observable<T>> window(long timespan, long timeshift, Tim
1035510355
* new window
1035610356
* @param unit
1035710357
* the unit of time that applies to the {@code timespan} argument
10358-
* @return an Observable that emits connected, non-overlapping windows represending items emitted by the
10358+
* @return an Observable that emits connected, non-overlapping windows representing items emitted by the
1035910359
* source Observable during fixed, consecutive durations
1036010360
* @see <a href="http://reactivex.io/documentation/operators/window.html">ReactiveX operators documentation: Window</a>
1036110361
*/
@@ -10581,9 +10581,9 @@ private static class Holder {
1058110581
}
1058210582

1058310583
/**
10584-
* Returns a singleton instance of NeverObservble (cast to the generic type).
10584+
* Returns a singleton instance of NeverObservable (cast to the generic type).
1058510585
*
10586-
* @return
10586+
* @return singleton instance of NeverObservable (cast to the generic type)
1058710587
*/
1058810588
@SuppressWarnings("unchecked")
1058910589
static <T> NeverObservable<T> instance() {

src/main/java/rx/Producer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* backpressure).
2222
*
2323
* <p>The request amount only affects calls to {@link Subscriber#onNext(Object)}; onError and onCompleted may appear without
24-
* requrests.
24+
* requests.
2525
*
2626
* <p>However, backpressure is somewhat optional in RxJava 1.x and Subscribers may not
2727
* receive a Producer via their {@link Subscriber#setProducer(Producer)} method and will run

src/main/java/rx/Single.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,7 +1719,7 @@ public final Subscription subscribe(Subscriber<? super T> subscriber) {
17191719
subscriber = new SafeSubscriber<T>(subscriber);
17201720
}
17211721

1722-
// The code below is exactly the same an unsafeSubscribe but not used because it would add a sigificent depth to alreay huge call stacks.
1722+
// The code below is exactly the same an unsafeSubscribe but not used because it would add a significant depth to already huge call stacks.
17231723
try {
17241724
// allow the hook to intercept and/or decorate
17251725
hook.onSubscribeStart(this, onSubscribe).call(subscriber);
@@ -2186,7 +2186,7 @@ public final Single<T> timeout(long timeout, TimeUnit timeUnit, Single<? extends
21862186
* the Single to use as the fallback in case of a timeout
21872187
* @param scheduler
21882188
* the {@link Scheduler} to run the timeout timers on
2189-
* @return the source Single modified so that it will switch to the fallback Singlein case of a timeout
2189+
* @return the source Single modified so that it will switch to the fallback Single in case of a timeout
21902190
* @see <a href="http://reactivex.io/documentation/operators/timeout.html">ReactiveX operators documentation: Timeout</a>
21912191
*/
21922192
public final Single<T> timeout(long timeout, TimeUnit timeUnit, Single<? extends T> other, Scheduler scheduler) {
@@ -2630,7 +2630,7 @@ public static <T, Resource> Single<T> using(
26302630
* Constructs an Single that creates a dependent resource object which is disposed of just before
26312631
* termination if you have set {@code disposeEagerly} to {@code true} and unsubscription does not occur
26322632
* before termination. Otherwise resource disposal will occur on unsubscription. Eager disposal is
2633-
* particularly appropriate for a synchronous Single that resuses resources. {@code disposeAction} will
2633+
* particularly appropriate for a synchronous Single that reuses resources. {@code disposeAction} will
26342634
* only be called once per subscription.
26352635
* <p>
26362636
* <img width="640" height="400" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/using.png" alt="">

src/main/java/rx/Subscriber.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ public void setProducer(Producer p) {
193193
toRequest = requested;
194194
producer = p;
195195
if (subscriber != null) {
196-
// middle operator ... we pass thru unless a request has been made
196+
// middle operator ... we pass through unless a request has been made
197197
if (toRequest == NOT_SET) {
198-
// we pass-thru to the next producer as nothing has been requested
198+
// we pass through to the next producer as nothing has been requested
199199
passToSubscriber = true;
200200
}
201201
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,10 @@ static <T> void postCompleteDrain(AtomicLong requested, Queue<T> queue, Subscrib
246246
* in which we know the queue won't change anymore (i.e., done is always true
247247
* when looking at the classical algorithm and there is no error).
248248
*
249-
* Note that we don't check for cancellation or emptyness upfront for two reasons:
249+
* Note that we don't check for cancellation or emptiness upfront for two reasons:
250250
* 1) if e != r, the loop will do this and we quit appropriately
251251
* 2) if e == r, then either there was no outstanding requests or we emitted the requested amount
252-
* and the execution simply falls to the e == r check below which checks for emptyness anyway.
252+
* and the execution simply falls to the e == r check below which checks for emptiness anyway.
253253
*/
254254

255255
while (e != r) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import rx.subscriptions.*;
2929

3030
/**
31-
* Corrrelates two sequences when they overlap and groups the results.
31+
* Correlates two sequences when they overlap and groups the results.
3232
*
3333
* @see <a href="http://msdn.microsoft.com/en-us/library/hh244235.aspx">MSDN: Observable.GroupJoin</a>
3434
* @param <T1> the left value type

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public Subscriber<? super T> call(final Subscriber<? super List<T>> child) {
9090
bsub.scheduleChunk();
9191
return bsub;
9292
}
93-
/** Subscriber when the buffer chunking time and lenght differ. */
93+
/** Subscriber when the buffer chunking time and length differ. */
9494
final class InexactSubscriber extends Subscriber<T> {
9595
final Subscriber<? super List<T>> child;
9696
final Worker inner;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ void emitLoop() {
614614
}
615615

616616
/*
617-
* We need to read done before innerSubscribers because innerSubcribers are added
617+
* We need to read done before innerSubscribers because innerSubscribers are added
618618
* before done is set to true. If it were the other way around, we could read an empty
619619
* innerSubscribers, get paused and then read a done flag but an async producer
620620
* might have added more subscribers between the two.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public Subscriber<? super T> call(Subscriber<? super T> child) {
5050
return parent;
5151
}
5252
/**
53-
* A terminatable producer which emits the latest items on request.
53+
* A terminable producer which emits the latest items on request.
5454
* @param <T>
5555
*/
5656
static final class LatestEmitter<T> extends AtomicLong implements Producer, Subscription, Observer<T> {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ void dispatch() {
486486
try {
487487
for (;;) {
488488
/*
489-
* We need to read terminalEvent before checking the queue for emptyness because
489+
* We need to read terminalEvent before checking the queue for emptiness because
490490
* all enqueue happens before setting the terminal event.
491491
* If it were the other way around, when the emission is paused between
492492
* checking isEmpty and checking terminalEvent, some other thread might

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ boolean add(InnerProducer<T> producer) {
377377
if (producers.compareAndSet(c, u)) {
378378
return true;
379379
}
380-
// if failed, some other operation succeded (another add, remove or termination)
380+
// if failed, some other operation succeeded (another add, remove or termination)
381381
// so retry
382382
}
383383
}
@@ -633,7 +633,7 @@ public void request(long n) {
633633
if (compareAndSet(r, u)) {
634634
// increment the total request counter
635635
addTotalRequested(n);
636-
// if successful, notify the parent dispacher this child can receive more
636+
// if successful, notify the parent dispatcher this child can receive more
637637
// elements
638638
parent.manageRequests();
639639

@@ -687,7 +687,7 @@ public long produced(long n) {
687687
}
688688
// try updating the request value
689689
if (compareAndSet(r, u)) {
690-
// and return the udpated value
690+
// and return the updated value
691691
return u;
692692
}
693693
// otherwise, some concurrent activity happened and we need to retry

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import rx.observers.SerializedSubscriber;
2525

2626
/**
27-
* Takes values from the source until the specific time ellapses.
27+
* Takes values from the source until the specific time elapses.
2828
*
2929
* @param <T>
3030
* the result value type

0 commit comments

Comments
 (0)