16
16
import java .util .concurrent .atomic .*;
17
17
18
18
import io .reactivex .*;
19
+ import io .reactivex .annotations .NonNull ;
20
+ import io .reactivex .annotations .Nullable ;
19
21
import io .reactivex .disposables .Disposable ;
20
22
import io .reactivex .exceptions .Exceptions ;
21
23
import io .reactivex .functions .Function ;
33
35
*/
34
36
public final class ObservableWithLatestFromMany <T , R > extends AbstractObservableWithUpstream <T , R > {
35
37
38
+ @ Nullable
36
39
final ObservableSource <?>[] otherArray ;
37
40
41
+ @ Nullable
38
42
final Iterable <? extends ObservableSource <?>> otherIterable ;
39
43
44
+ @ NonNull
40
45
final Function <? super Object [], R > combiner ;
41
46
42
- public ObservableWithLatestFromMany (ObservableSource <T > source , ObservableSource <?>[] otherArray , Function <? super Object [], R > combiner ) {
47
+ public ObservableWithLatestFromMany (@ NonNull ObservableSource <T > source , @ NonNull ObservableSource <?>[] otherArray , @ NonNull Function <? super Object [], R > combiner ) {
43
48
super (source );
44
49
this .otherArray = otherArray ;
45
50
this .otherIterable = null ;
46
51
this .combiner = combiner ;
47
52
}
48
53
49
- public ObservableWithLatestFromMany (ObservableSource <T > source , Iterable <? extends ObservableSource <?>> otherIterable , Function <? super Object [], R > combiner ) {
54
+ public ObservableWithLatestFromMany (@ NonNull ObservableSource <T > source , @ NonNull Iterable <? extends ObservableSource <?>> otherIterable , @ NonNull Function <? super Object [], R > combiner ) {
50
55
super (source );
51
56
this .otherArray = null ;
52
57
this .otherIterable = otherIterable ;
@@ -58,6 +63,7 @@ protected void subscribeActual(Observer<? super R> s) {
58
63
ObservableSource <?>[] others = otherArray ;
59
64
int n = 0 ;
60
65
if (others == null ) {
66
+ assert otherIterable !=null ;
61
67
others = new ObservableSource [8 ];
62
68
63
69
try {
0 commit comments