Skip to content

Commit b504e6c

Browse files
committed
More work on #1322 (missing javadocs)
1 parent a270165 commit b504e6c

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

rxjava-core/src/main/java/rx/Observable.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7779,7 +7779,6 @@ public final BlockingObservable<T> toBlocking() {
77797779
* <p>
77807780
* {@code toList} does not operate by default on a particular {@link Scheduler}.
77817781
*
7782-
* @warn description may be out-of-date
77837782
* @return an Observable that emits a single item: a List containing all of the items emitted by the source
77847783
* Observable
77857784
* @see <a href="https://github.com/Netflix/RxJava/wiki/Mathematical-and-Aggregate-Operators#tolist">RxJava Wiki: toList()</a>

rxjava-core/src/main/java/rx/Subscriber.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
import rx.subscriptions.CompositeSubscription;
2020

2121
/**
22-
* Provides a mechanism for receiving push-based notifications.
22+
* Provides a mechanism for receiving push-based notifications from Observables, and permits manual
23+
* unsubscribing from these Observables.
2324
* <p>
2425
* After a Subscriber calls an {@link Observable}'s {@link Observable#subscribe subscribe} method, the
2526
* {@link Observable} calls the Subscriber's {@link #onNext} method to emit items. A well-behaved
@@ -49,9 +50,11 @@ protected Subscriber(Subscriber<?> op) {
4950
}
5051

5152
/**
52-
* Registers an unsubscribe callback.
53+
* Adds a {@link Subscription} to this Subscriber's list of subscriptions if this list is not marked as
54+
* unsubscribed. If the list <em>is</em> marked as unsubscribed, {@code add} will indicate this by
55+
* explicitly unsubscribing the new {@code Subscription} as well.
5356
*
54-
* @warn param "s" undescribed
57+
* @param s the {@code Subscription} to add
5558
*/
5659
public final void add(Subscription s) {
5760
cs.add(s);
@@ -63,9 +66,9 @@ public final void unsubscribe() {
6366
}
6467

6568
/**
66-
* Indicates whether this Subscriber has unsubscribed from its Observable.
69+
* Indicates whether this Subscriber has unsubscribed from its list of subscriptions.
6770
*
68-
* @return {@code true} if this Subscriber has unsubscribed from its Observable, {@code false} otherwise
71+
* @return {@code true} if this Subscriber has unsubscribed from its subscriptions, {@code false} otherwise
6972
*/
7073
public final boolean isUnsubscribed() {
7174
return cs.isUnsubscribed();

rxjava-core/src/main/java/rx/internal/util/SubscriptionList.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ public void add(final Subscription s) {
7272
}
7373
}
7474

75+
/**
76+
* Unsubscribe from all of the subscriptions in the list, which stops the receipt of notifications on
77+
* the associated {@code Subscriber}.
78+
*/
7579
@Override
7680
public void unsubscribe() {
7781
synchronized (this) {
@@ -84,10 +88,6 @@ public void unsubscribe() {
8488
unsubscribeFromAll(subscriptions);
8589
}
8690

87-
/**
88-
* @warn javadoc missing
89-
* @param subscriptions
90-
*/
9191
private static void unsubscribeFromAll(Collection<Subscription> subscriptions) {
9292
if (subscriptions == null) {
9393
return;

0 commit comments

Comments
 (0)