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

OperatorTakeLast #1134

Merged
merged 1 commit into from
May 5, 2014
Merged

OperatorTakeLast #1134

merged 1 commit into from
May 5, 2014

Conversation

zsxwing
Copy link
Member

@zsxwing zsxwing commented Apr 30, 2014

Operator TakeLast.

There are two changes comparing with the original implementations:

  • Throw IndexOutOfBoundsException at once when calling takeLast with count < 0.
  • Replace IllegalArgumentException with IndexOutOfBoundsException when count < 0 in TakeLastWithTimed.

Issue #1060

@cloudbees-pull-request-builder

RxJava-pull-requests #1046 SUCCESS
This pull request looks good

@akarnokd akarnokd mentioned this pull request Apr 30, 2014
57 tasks
@@ -6356,7 +6356,7 @@ public final Subscription subscribe(Subscriber<? super T> observer, Scheduler sc
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#wiki-takelast">RxJava Wiki: takeLast()</a>
*/
public final Observable<T> takeLast(final int count) {
return create(OperationTakeLast.takeLast(this, count));
return lift(new OperatorTakeLast(count));
Copy link
Member

Choose a reason for hiding this comment

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

Could you add the type parameters to the constructor calls here and below?

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch

@cloudbees-pull-request-builder

RxJava-pull-requests #1048 SUCCESS
This pull request looks good

benjchristensen added a commit that referenced this pull request May 5, 2014
@benjchristensen benjchristensen merged commit eebcd08 into ReactiveX:master May 5, 2014
@zsxwing zsxwing deleted the take-last branch May 6, 2014 12:36
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

Successfully merging this pull request may close these issues.

4 participants