-
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
2.x: Cleaunp - rename fields to upstream and downstream #6129
Conversation
Codecov Report
@@ Coverage Diff @@
## 2.x #6129 +/- ##
============================================
- Coverage 98.23% 98.21% -0.03%
- Complexity 6194 6197 +3
============================================
Files 667 667
Lines 44853 44853
Branches 6213 6213
============================================
- Hits 44063 44054 -9
Misses 245 245
- Partials 545 554 +9
Continue to review full report at Codecov.
|
@@ -68,14 +68,14 @@ | |||
|
|||
/** | |||
* Sets a Disposable on this emitter; any previous Disposable | |||
* or Cancellation will be unsubscribed/cancelled. | |||
* @param s the disposable, null is allowed | |||
* or Cancellable will be disposed/cancelled. |
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.
{@link
?
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.
Very welcomed change, thanks
@@ -26,11 +26,21 @@ | |||
* <li>{@code TestObserver} named as {@code ts*}</li> | |||
* <li>{@code PublishProcessor} named as {@code ps*}</li> | |||
* <li>{@code PublishSubject} named as {@code pp*}</li> | |||
* <li>{@code Subscription} with single letter name such as "s" or "d"</li> |
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.
👍
Thanks @artem-zinnatullin for your diligent review of this PR. |
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.
Very nice 👍
👍 very helpful thanks |
@@ -28,13 +28,13 @@ | |||
public abstract class BasicFuseableObserver<T, R> implements Observer<T>, QueueDisposable<R> { | |||
|
|||
/** The downstream subscriber. */ | |||
protected final Observer<? super R> actual; |
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.
fyi these are protected fields so will break folks. We'll try and work around this, just saying. cc @kojilin
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.
In
src/main/java/io/reactivex/internal/observers/BasicFuseableObserver.java
<#6129 (comment)>:
Internal.
https://github.com/ReactiveX/RxJava#ioreactivexinternal
YIKES we have a lot of use of internal types, just didn't notice until you
mentioned. Will go through and rewrite a bunch of things. Thanks for the
pointer.
|
This PR cleans up the field namings and some local variable namings:
upstream
for the connectionDisposable
orSubscription
instead ofd
,s
, etc., includingAtomicReference<*>
declarations.downstream
for the consumer field name in operators instead ofactual
for example.Disposable s
->Disposable d
, etc.The
CheckLocalVariablesInTests
has been extended with the relevant regexp checks.