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

mostRecent returning NotificationLite#ON_NEXT_NULL_SENTINEL #1542

Closed
yogurtearl opened this issue Aug 1, 2014 · 4 comments
Closed

mostRecent returning NotificationLite#ON_NEXT_NULL_SENTINEL #1542

yogurtearl opened this issue Aug 1, 2014 · 4 comments
Milestone

Comments

@yogurtearl
Copy link

This can return NotificationLite#ON_NEXT_NULL_SENTINEL or NotificationLite#ON_COMPLETED_SENTINEL.

Observable<Foo> observable = .... ;
Foo foo = observable.toBlocking().mostRecent(null).iterator().next()

which will cause a ClassCastException....

This seems inconsistent with the docs and it didn't used to do this ( in 0.17.5 )
https://github.com/Netflix/RxJava/wiki/Blocking-Observable-Operators#mostrecent

Looks like the fix will probably relate to BlockingOperatorMostRecent.MostRecentObserver

@benjchristensen
Copy link
Member

Thanks for reporting this. I think I know what caused this.

@benjchristensen benjchristensen added this to the 0.20 milestone Aug 4, 2014
@benjchristensen
Copy link
Member

@abersnaze Do you have time to take a look at this?

@abersnaze
Copy link
Contributor

Sure, I'll take look.

@benjchristensen
Copy link
Member

Fixed in #1552

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants