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: Change Completable.subscribe(onError, onComplete) to (onComplete, onError) #4140

Merged

Conversation

artem-zinnatullin
Copy link
Contributor

Closes #3851, closes #4137.

});
}

@Test(expected = NullPointerException.class)
public void subscribeTwoCallbacksSecondNull() {
normal.completable.subscribe(null, new Action0() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Didn't catch that on initial PR, test was obviously copied from subscribeTwoCallbacksFirstNull and wasn't changed, second parameter should have been null.

@artem-zinnatullin artem-zinnatullin changed the title 1.x: Change Completable.subscribe(error, completed) to (completed, error) 1.x: Change Completable.subscribe(onError, onComplete) to (onComplete, onError) Jun 27, 2016
@artem-zinnatullin artem-zinnatullin force-pushed the 1x/az/completable-subscribe branch from 8912d87 to 55723da Compare June 27, 2016 17:39
@artem-zinnatullin
Copy link
Contributor Author

Actually, I can deprecate old one and add new one as overload, it will have less impact on user code because only calls like subscribe(Actions.empty(), Actions.empty()) will be ambiguous to the compiler.

Thoughts?

@codecov-io
Copy link

Current coverage is 81.33%

Merging #4140 into 1.x will increase coverage by 0.04%

@@                1.x      #4140   diff @@
==========================================
  Files           257        257          
  Lines         16811      16811          
  Methods           0          0          
  Messages          0          0          
  Branches       2547       2547          
==========================================
+ Hits          13666      13673     +7   
+ Misses         2243       2238     -5   
+ Partials        902        900     -2   

Powered by Codecov. Last updated by 5c74757...55723da

@akarnokd
Copy link
Member

👍

@akarnokd
Copy link
Member

Dynamic languages have trouble with the two methods, let's only have 1 method.

@zsxwing
Copy link
Member

zsxwing commented Jun 28, 2016

👍

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