Skip to content

Commit

Permalink
Fix missing NonNull on Observable.map (#7302)
Browse files Browse the repository at this point in the history
* Fix missing NonNull on Observable.map

I noticed this while testing the upcoming Kotlin 1.5.30-M1 (which has improved support for type-use nullability annotations) https://youtrack.jetbrains.com/issue/KT-47833. This makes `at least match Single, but `Maybe.map` is also missing this. I suspect there are others too.

* Update src/main/java/io/reactivex/rxjava3/core/Observable.java
  • Loading branch information
ZacSweers authored Jul 23, 2021
1 parent bb814d2 commit 75e7e50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/io/reactivex/rxjava3/core/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -10371,7 +10371,7 @@ public final <R> Observable<R> lift(@NonNull ObservableOperator<? extends R, ? s
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
@NonNull
public final <R> Observable<R> map(@NonNull Function<? super T, ? extends R> mapper) {
public final <@NonNull R> Observable<R> map(@NonNull Function<? super T, ? extends R> mapper) {
Objects.requireNonNull(mapper, "mapper is null");
return RxJavaPlugins.onAssembly(new ObservableMap<>(this, mapper));
}
Expand Down

0 comments on commit 75e7e50

Please sign in to comment.