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

2.x: cleanup, behavior clarifications, fixes, coverage 8/28-1 #4435

Merged
merged 1 commit into from
Aug 28, 2016

Conversation

akarnokd
Copy link
Member

  • Add tests
  • fix mistakes in TestObserver
  • Combine DisposableHelper and its inner Disposed enum
  • Compact NotificationLite and its inner Complete enum
  • Fix NPE in ListCompositeDisposable constructor
  • Fix DeferredScalarObserver fusion and state management
  • Turned a few empty enums into classes with private constructor: coverage can't cover them 100% otherwise. These empty enums have a constructor in their bytecode which never gets called and thus there's always 10 instructions / 2 method calls missing.
  • Removed TestObserver.awaitDone(), one should always await with timeout

@codecov-io
Copy link

Current coverage is 75.11% (diff: 94.80%)

Merging #4435 into 2.x will increase coverage by 1.43%

@@                2.x      #4435   diff @@
==========================================
  Files           453        453          
  Lines         32373      32399    +26   
  Methods           0          0          
  Messages          0          0          
  Branches       5220       5216     -4   
==========================================
+ Hits          23852      24337   +485   
+ Misses         6435       6037   -398   
+ Partials       2086       2025    -61   

Powered by Codecov. Last update 25e78c5...021a001

@@ -42,6 +42,7 @@ public ListCompositeDisposable(Disposable... resources) {

public ListCompositeDisposable(Iterable<? extends Disposable> resources) {
ObjectHelper.requireNonNull(resources, "resources is null");
this.resources = new LinkedList<Disposable>();
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: initialize with resources size?

Copy link
Member Author

Choose a reason for hiding this comment

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

LinkedList?!

Copy link
Contributor

Choose a reason for hiding this comment

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

Also iterables do not expose their size anyway. Only collections.

@JakeWharton
Copy link
Contributor

Turned a few empty enums into classes with private constructor

This saves methods for Android as well. I wanted to see how many were being added before pressing the issue about this convention, but nice to see there's another motivation for not using enums here.

@JakeWharton
Copy link
Contributor

👍

@akarnokd akarnokd merged commit f97c50d into ReactiveX:2.x Aug 28, 2016
@akarnokd akarnokd deleted the Coverage828_1 branch September 14, 2016 19:59
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