Skip to content

2.x: implement ops, add javadoc, remove unused components 8/19-2 #4378

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

Merged
merged 1 commit into from
Aug 19, 2016

Conversation

akarnokd
Copy link
Member

@akarnokd akarnokd commented Aug 19, 2016

Notable changes:

  • use JMH 1.13
  • fix javadoc generator exclude pattern
  • add javadoc to many components
  • remove Observers and Subscribers - all their function is available via subscribe() and/or by implementing the abstract XObserver/XSubscriber provided
  • remove Schedulers.immediate()
  • remove Single.subscribe(Subscriber), Single.subscribe(Observer), Completable.subscribe(Subscriber) and Completable.subscribe(Observer)
  • remove CompletableSerializedObserver and SingleSerializedObserver and their parent package
  • implement Single.takeUntil, Single.flatMapCompletable
  • update the time-shift handling in the default Scheduler.schedulePeriodically() to match 1.x
  • fix Single.subscribeOn disposable management
  • renamed Subject.hasSubscribers to Subject.hasObservers

*
* @return a {@code TestScheduler} meant for debugging
*/
public static TestScheduler test() { // NOPMD
return new TestScheduler();
Copy link
Contributor

Choose a reason for hiding this comment

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

As an aside, it's weird that this is a factory and all the others are accessors. Is TestScheduler's constructor public? If so we should just remove this static method that implies there's somehow a shared scheduler for tests.

Copy link
Member Author

Choose a reason for hiding this comment

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

This method is traditional

Schedulers.test();
new TestScheduler();

Copy link
Contributor

Choose a reason for hiding this comment

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

Traditional how? That it's in 1.x? I don't see why that should stop us from removing it.

Doing something like this is wrong:

timer(1, SECONDS, Schedulers.test())

yet it's how you'd use every other static method in this class.

Copy link
Member Author

Choose a reason for hiding this comment

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

I see. Will you post a PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

Always!

On Fri, Aug 19, 2016 at 4:41 PM David Karnok [email protected]
wrote:

In src/main/java/io/reactivex/schedulers/Schedulers.java
#4378 (comment):

 public static Scheduler io() {
     return RxJavaPlugins.onIoScheduler(IO);
 }
  • public static TestScheduler test() {
  • /**
  • \* Creates and returns a {@code TestScheduler}, which is useful for debugging. It allows you to test
    
  • \* schedules of events by manually advancing the clock at whatever pace you choose.
    
  • *
    
  • \* @return a {@code TestScheduler} meant for debugging
    
  • */
    
  • public static TestScheduler test() { // NOPMD
    return new TestScheduler();

I see. Will you post a PR?


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
https://github.com/ReactiveX/RxJava/pull/4378/files/dcdf77a7e2fd6bc836ba63e443424b405321ebcc#r75548361,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAEEEe2CE0q5ZDuQa2XTRs0gHCYT_lLNks5qhhUUgaJpZM4JozrR
.

@codecov-io
Copy link

codecov-io commented Aug 19, 2016

Current coverage is 69.61% (diff: 76.77%)

Merging #4378 into 2.x will increase coverage by 0.96%

@@                2.x      #4378   diff @@
==========================================
  Files           452        450     -2   
  Lines         32405      32007   -398   
  Methods           0          0          
  Messages          0          0          
  Branches       5129       5108    -21   
==========================================
+ Hits          22244      22281    +37   
+ Misses         8014       7577   -437   
- Partials       2147       2149     +2   

Powered by Codecov. Last update 60bf4fc...dcdf77a

@JakeWharton
Copy link
Contributor

JakeWharton commented Aug 19, 2016

👍 to code changes. Skimmed the Javadoc for formatting only, not content.

@akarnokd akarnokd merged commit fba05ea into ReactiveX:2.x Aug 19, 2016
@akarnokd akarnokd deleted the MissingStuff819_2 branch August 19, 2016 20:20
@akarnokd
Copy link
Member Author

I'm not worried about javadoc; the community is great at finding errors in there that can be trivially fixed.

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.

3 participants