Skip to content

Commit aa3f961

Browse files
committed
[Proposal] Remote CheckReturnValue on subscribe() overloads
Proposal PR for my followup comment in #4878 at . Will close if the discussion raised there still settles on keeping them.
1 parent 2334d88 commit aa3f961

File tree

5 files changed

+0
-16
lines changed

5 files changed

+0
-16
lines changed

src/main/java/io/reactivex/Completable.java

-2
Original file line numberDiff line numberDiff line change
@@ -2318,7 +2318,6 @@ public final <E extends CompletableObserver> E subscribeWith(E observer) {
23182318
* @return the Disposable that can be used for disposing the subscription asynchronously
23192319
* @throws NullPointerException if either callback is null
23202320
*/
2321-
@CheckReturnValue
23222321
@SchedulerSupport(SchedulerSupport.NONE)
23232322
public final Disposable subscribe(final Action onComplete, final Consumer<? super Throwable> onError) {
23242323
ObjectHelper.requireNonNull(onError, "onError is null");
@@ -2345,7 +2344,6 @@ public final Disposable subscribe(final Action onComplete, final Consumer<? supe
23452344
* @param onComplete the runnable called when this Completable completes normally
23462345
* @return the Disposable that allows disposing the subscription
23472346
*/
2348-
@CheckReturnValue
23492347
@SchedulerSupport(SchedulerSupport.NONE)
23502348
public final Disposable subscribe(final Action onComplete) {
23512349
ObjectHelper.requireNonNull(onComplete, "onComplete is null");

src/main/java/io/reactivex/Flowable.java

-4
Original file line numberDiff line numberDiff line change
@@ -14362,7 +14362,6 @@ public final Disposable subscribe() {
1436214362
* if {@code onNext} is null
1436314363
* @see <a href="http://reactivex.io/documentation/operators/subscribe.html">ReactiveX operators documentation: Subscribe</a>
1436414364
*/
14365-
@CheckReturnValue
1436614365
@BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
1436714366
@SchedulerSupport(SchedulerSupport.NONE)
1436814367
public final Disposable subscribe(Consumer<? super T> onNext) {
@@ -14393,7 +14392,6 @@ public final Disposable subscribe(Consumer<? super T> onNext) {
1439314392
* if {@code onNext} is null, or
1439414393
* if {@code onError} is null
1439514394
*/
14396-
@CheckReturnValue
1439714395
@BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
1439814396
@SchedulerSupport(SchedulerSupport.NONE)
1439914397
public final Disposable subscribe(Consumer<? super T> onNext, Consumer<? super Throwable> onError) {
@@ -14427,7 +14425,6 @@ public final Disposable subscribe(Consumer<? super T> onNext, Consumer<? super T
1442714425
* if {@code onComplete} is null
1442814426
* @see <a href="http://reactivex.io/documentation/operators/subscribe.html">ReactiveX operators documentation: Subscribe</a>
1442914427
*/
14430-
@CheckReturnValue
1443114428
@BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
1443214429
@SchedulerSupport(SchedulerSupport.NONE)
1443314430
public final Disposable subscribe(Consumer<? super T> onNext, Consumer<? super Throwable> onError,
@@ -14465,7 +14462,6 @@ public final Disposable subscribe(Consumer<? super T> onNext, Consumer<? super T
1446514462
* if {@code onSubscribe} is null
1446614463
* @see <a href="http://reactivex.io/documentation/operators/subscribe.html">ReactiveX operators documentation: Subscribe</a>
1446714464
*/
14468-
@CheckReturnValue
1446914465
@BackpressureSupport(BackpressureKind.SPECIAL)
1447014466
@SchedulerSupport(SchedulerSupport.NONE)
1447114467
public final Disposable subscribe(Consumer<? super T> onNext, Consumer<? super Throwable> onError,

src/main/java/io/reactivex/Maybe.java

-3
Original file line numberDiff line numberDiff line change
@@ -4095,7 +4095,6 @@ public final Disposable subscribe() {
40954095
* if {@code onSuccess} is null
40964096
* @see <a href="http://reactivex.io/documentation/operators/subscribe.html">ReactiveX operators documentation: Subscribe</a>
40974097
*/
4098-
@CheckReturnValue
40994098
@SchedulerSupport(SchedulerSupport.NONE)
41004099
public final Disposable subscribe(Consumer<? super T> onSuccess) {
41014100
return subscribe(onSuccess, Functions.ON_ERROR_MISSING, Functions.EMPTY_ACTION);
@@ -4121,7 +4120,6 @@ public final Disposable subscribe(Consumer<? super T> onSuccess) {
41214120
* if {@code onSuccess} is null, or
41224121
* if {@code onError} is null
41234122
*/
4124-
@CheckReturnValue
41254123
@SchedulerSupport(SchedulerSupport.NONE)
41264124
public final Disposable subscribe(Consumer<? super T> onSuccess, Consumer<? super Throwable> onError) {
41274125
return subscribe(onSuccess, onError, Functions.EMPTY_ACTION);
@@ -4151,7 +4149,6 @@ public final Disposable subscribe(Consumer<? super T> onSuccess, Consumer<? supe
41514149
* if {@code onComplete} is null
41524150
* @see <a href="http://reactivex.io/documentation/operators/subscribe.html">ReactiveX operators documentation: Subscribe</a>
41534151
*/
4154-
@CheckReturnValue
41554152
@SchedulerSupport(SchedulerSupport.NONE)
41564153
public final Disposable subscribe(Consumer<? super T> onSuccess, Consumer<? super Throwable> onError,
41574154
Action onComplete) {

src/main/java/io/reactivex/Observable.java

-4
Original file line numberDiff line numberDiff line change
@@ -12033,7 +12033,6 @@ public final Disposable subscribe() {
1203312033
* if {@code onNext} is null
1203412034
* @see <a href="http://reactivex.io/documentation/operators/subscribe.html">ReactiveX operators documentation: Subscribe</a>
1203512035
*/
12036-
@CheckReturnValue
1203712036
@SchedulerSupport(SchedulerSupport.NONE)
1203812037
public final Disposable subscribe(Consumer<? super T> onNext) {
1203912038
return subscribe(onNext, Functions.ON_ERROR_MISSING, Functions.EMPTY_ACTION, Functions.emptyConsumer());
@@ -12059,7 +12058,6 @@ public final Disposable subscribe(Consumer<? super T> onNext) {
1205912058
* if {@code onNext} is null, or
1206012059
* if {@code onError} is null
1206112060
*/
12062-
@CheckReturnValue
1206312061
@SchedulerSupport(SchedulerSupport.NONE)
1206412062
public final Disposable subscribe(Consumer<? super T> onNext, Consumer<? super Throwable> onError) {
1206512063
return subscribe(onNext, onError, Functions.EMPTY_ACTION, Functions.emptyConsumer());
@@ -12089,7 +12087,6 @@ public final Disposable subscribe(Consumer<? super T> onNext, Consumer<? super T
1208912087
* if {@code onComplete} is null
1209012088
* @see <a href="http://reactivex.io/documentation/operators/subscribe.html">ReactiveX operators documentation: Subscribe</a>
1209112089
*/
12092-
@CheckReturnValue
1209312090
@SchedulerSupport(SchedulerSupport.NONE)
1209412091
public final Disposable subscribe(Consumer<? super T> onNext, Consumer<? super Throwable> onError,
1209512092
Action onComplete) {
@@ -12123,7 +12120,6 @@ public final Disposable subscribe(Consumer<? super T> onNext, Consumer<? super T
1212312120
* if {@code onSubscribe} is null
1212412121
* @see <a href="http://reactivex.io/documentation/operators/subscribe.html">ReactiveX operators documentation: Subscribe</a>
1212512122
*/
12126-
@CheckReturnValue
1212712123
@SchedulerSupport(SchedulerSupport.NONE)
1212812124
public final Disposable subscribe(Consumer<? super T> onNext, Consumer<? super Throwable> onError,
1212912125
Action onComplete, Consumer<? super Disposable> onSubscribe) {

src/main/java/io/reactivex/Single.java

-3
Original file line numberDiff line numberDiff line change
@@ -3418,7 +3418,6 @@ public final Disposable subscribe() {
34183418
* @throws NullPointerException
34193419
* if {@code onCallback} is null
34203420
*/
3421-
@CheckReturnValue
34223421
@SchedulerSupport(SchedulerSupport.NONE)
34233422
public final Disposable subscribe(final BiConsumer<? super T, ? super Throwable> onCallback) {
34243423
ObjectHelper.requireNonNull(onCallback, "onCallback is null");
@@ -3446,7 +3445,6 @@ public final Disposable subscribe(final BiConsumer<? super T, ? super Throwable>
34463445
* if {@code onSuccess} is null
34473446
* @see <a href="http://reactivex.io/documentation/operators/subscribe.html">ReactiveX operators documentation: Subscribe</a>
34483447
*/
3449-
@CheckReturnValue
34503448
@SchedulerSupport(SchedulerSupport.NONE)
34513449
public final Disposable subscribe(Consumer<? super T> onSuccess) {
34523450
return subscribe(onSuccess, Functions.ON_ERROR_MISSING);
@@ -3471,7 +3469,6 @@ public final Disposable subscribe(Consumer<? super T> onSuccess) {
34713469
* if {@code onSuccess} is null, or
34723470
* if {@code onError} is null
34733471
*/
3474-
@CheckReturnValue
34753472
@SchedulerSupport(SchedulerSupport.NONE)
34763473
public final Disposable subscribe(final Consumer<? super T> onSuccess, final Consumer<? super Throwable> onError) {
34773474
ObjectHelper.requireNonNull(onSuccess, "onSuccess is null");

0 commit comments

Comments
 (0)