Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.x: No more need to convert Singles to Observables for Single.zip() #3579

Merged

Conversation

artem-zinnatullin
Copy link
Contributor

PTAL

@artem-zinnatullin artem-zinnatullin force-pushed the single-zip-no-more-as-observable branch from 6b8b630 to 57dd6d9 Compare December 17, 2015 10:59
@akarnokd
Copy link
Member

👍

@@ -966,8 +966,13 @@ public void onError(Throwable error) {
* @return a Single that emits the zipped results
* @see <a href="http://reactivex.io/documentation/operators/zip.html">ReactiveX operators documentation: Zip</a>
*/
public final static <T1, T2, R> Single<R> zip(Single<? extends T1> o1, Single<? extends T2> o2, final Func2<? super T1, ? super T2, ? extends R> zipFunction) {
return just(new Observable<?>[] { asObservable(o1), asObservable(o2) }).lift(new OperatorZip<R>(zipFunction));
public static <T1, T2, R> Single<R> zip(Single<? extends T1> s1, Single<? extends T2> s2, final Func2<? super T1, ? super T2, ? extends R> zipFunction) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: please add final back.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or remove final from all static methods in another PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm for the removal as well, it's redundant. (I also remember an argument about it some time back.)

@zsxwing
Copy link
Member

zsxwing commented Jan 11, 2016

Could you add final back for all these methods? Otherwise, LGTM

@akarnokd akarnokd changed the title No more need to convert Singles to Observables for Single.zip() 1.x: No more need to convert Singles to Observables for Single.zip() Jan 22, 2016
@artem-zinnatullin artem-zinnatullin force-pushed the single-zip-no-more-as-observable branch from 57dd6d9 to f5716b4 Compare January 23, 2016 18:39
@artem-zinnatullin artem-zinnatullin force-pushed the single-zip-no-more-as-observable branch from f5716b4 to b4a6fdd Compare January 23, 2016 18:40
@artem-zinnatullin
Copy link
Contributor Author

Sorry, was busy… @zsxwing added final back, will send separate PR to remove them everywhere once this merged.

@zsxwing
Copy link
Member

zsxwing commented Jan 24, 2016

👍

akarnokd added a commit that referenced this pull request Jan 24, 2016
…-observable

1.x: No more need to convert Singles to Observables for Single.zip()
@akarnokd akarnokd merged commit 2dbf686 into ReactiveX:1.x Jan 24, 2016
@artem-zinnatullin artem-zinnatullin deleted the single-zip-no-more-as-observable branch January 27, 2016 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants