-
Notifications
You must be signed in to change notification settings - Fork 7.6k
2.x: cleanup, bugfixes, coverage 8/27-2 #4434
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
Conversation
@@ -1743,16 +1743,10 @@ public static int bufferSize() { | |||
*/ | |||
@SchedulerSupport(SchedulerSupport.CUSTOM) | |||
public static Observable<Long> interval(long initialDelay, long period, TimeUnit unit, Scheduler scheduler) { | |||
if (initialDelay < 0) { | |||
initialDelay = 0L; |
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.
Surprised we aren't throwing here (and others)
8fe1243
to
dd435fd
Compare
throw new IllegalArgumentException("skip > 0 required but it was " + count); | ||
} | ||
verifyPositive(count, "count"); | ||
verifyPositive(skip, "skip"); |
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.
I think one of these is wrong because skip
can be 0 but count
cannot.
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.
Based on other methods in this diff I would guess verifyPositive
rejects 0
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.
It creates buffers every index % skip
so zero not allowed.
👍 |
Current coverage is 73.67% (diff: 92.59%)@@ 2.x #4434 diff @@
==========================================
Files 453 453
Lines 32383 32373 -10
Methods 0 0
Messages 0 0
Branches 5233 5220 -13
==========================================
+ Hits 22969 23852 +883
+ Misses 7300 6437 -863
+ Partials 2114 2084 -30
|
dd435fd
to
ff7d7ff
Compare
Single
,Completable
andObservable