-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Implemented Next Operation #152
Conversation
Implemented #58 using next operation. |
@mairbek thank you for submitting these, they look great based on a quick glance. I've been crushed on some production work so have been delayed in reviewing these. I will get to this and your other pull request definitely this week. |
} | ||
|
||
if (!predicate.call(result)) { | ||
throw new IllegalStateException("Last value should match the predicate"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on my reading of the MSDN doc this should just result in returning the default value, not throwing an Exception.
"Returns the last element of an observable sequence that matches the predicate, or a default value if no value is found."
http://msdn.microsoft.com/en-us/library/hh228948(v=vs.103).aspx
It should return the last value that matches the predicate, but if nothing matches then it should return the default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove exception throwing for case when default value is specified.
I merged #156 which provides the toIterable functionality. Closing this one due to the issues discussed above. |
* Add documentation for TimeLimiter * Update timelimiter.adoc Fix text errors.
Fixes issue #66