Skip to content

Commit 0ad8980

Browse files
committed
Added variance to selector functions
1 parent 900dca8 commit 0ad8980

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5250,7 +5250,7 @@ public ConnectableObservable<T> publish(T initialValue) {
52505250
* selector on a connectable observable sequence that shares a single
52515251
* subscription to the underlying sequence.
52525252
*/
5253-
public <R> Observable<R> publish(Func1<Observable<T>, Observable<R>> selector) {
5253+
public <R> Observable<R> publish(Func1<? super Observable<T>, ? extends Observable<R>> selector) {
52545254
return multicast(new Func0<Subject<T, T>>() {
52555255
@Override
52565256
public Subject<T, T> call() {
@@ -5270,7 +5270,7 @@ public Subject<T, T> call() {
52705270
* @param initialValue the initial value of the underlying BehaviorSubject
52715271
* @return an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence and starts with initialValue
52725272
*/
5273-
public <R> Observable<R> publish(Func1<Observable<T>, Observable<R>> selector, final T initialValue) {
5273+
public <R> Observable<R> publish(Func1<? super Observable<T>, ? extends Observable<R>> selector, final T initialValue) {
52745274
return multicast(new Func0<Subject<T, T>>() {
52755275
@Override
52765276
public Subject<T, T> call() {
@@ -5307,7 +5307,7 @@ public ConnectableObservable<T> publishLast() {
53075307
* subscription to the underlying sequence containing only the last
53085308
* notification.
53095309
*/
5310-
public <R> Observable<R> publishLast(Func1<Observable<T>, Observable<R>> selector) {
5310+
public <R> Observable<R> publishLast(Func1<? super Observable<T>, ? extends Observable<R>> selector) {
53115311
return multicast(new Func0<Subject<T, T>>() {
53125312
@Override
53135313
public Subject<T, T> call() {

0 commit comments

Comments
 (0)