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

Remove unnecessary generic type parameters for delaySubscription methods in Single #5511

Merged

Conversation

plackemacher
Copy link
Contributor

I was running into an issue with using the delaySubscription(long time, TimeUnit unit) while testing a Single and I saw that the U generic type parameter was there unnecessarily. I believe this is only a Kotlin specific issue as I tried playing around in Java and there was no inference error upon compilation. To get it to compile for Kotlin, I would need to specify the generic type parameter and it didn't matter what I set it to as Any was a valid option: .delaySubscription<Any>(5, TimeUnit.SECONDS). I also went through Flowable, Observable, and Maybe and saw that the generics were missing for the time-specific delaySubscription methods so I believe they should be removed from Single as well to help keep things consistent and remove this compilation error for future Kotlin users.

kotlin_error

@codecov
Copy link

codecov bot commented Jul 21, 2017

Codecov Report

Merging #5511 into 2.x will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##               2.x    #5511      +/-   ##
===========================================
+ Coverage     96.1%   96.11%   +0.01%     
- Complexity    5807     5808       +1     
===========================================
  Files          631      631              
  Lines        41285    41285              
  Branches      5732     5732              
===========================================
+ Hits         39676    39681       +5     
+ Misses         638      629       -9     
- Partials       971      975       +4
Impacted Files Coverage Δ Complexity Δ
src/main/java/io/reactivex/Single.java 100% <ø> (ø) 132 <0> (ø) ⬇️
.../operators/observable/ObservableFlatMapSingle.java 88.8% <0%> (-5.98%) 2% <0%> (ø)
...ternal/operators/flowable/FlowableSampleTimed.java 91.17% <0%> (-5.89%) 3% <0%> (ø)
.../operators/flowable/FlowableBlockingSubscribe.java 91.66% <0%> (-5.56%) 9% <0%> (-1%)
...activex/internal/operators/single/SingleUsing.java 95.18% <0%> (-4.82%) 4% <0%> (ø)
...tivex/internal/observers/FutureSingleObserver.java 94.33% <0%> (-3.78%) 24% <0%> (-1%)
...internal/operators/completable/CompletableAmb.java 94.91% <0%> (-3.39%) 10% <0%> (-1%)
...activex/internal/operators/single/SingleCache.java 97.05% <0%> (-2.95%) 23% <0%> (-1%)
...ternal/operators/completable/CompletableUsing.java 97.61% <0%> (-2.39%) 4% <0%> (ø)
...operators/observable/ObservableConcatMapEager.java 97.26% <0%> (-2.19%) 2% <0%> (ø)
... and 34 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f51cd52...5cfc99f. Read the comment docs.

@akarnokd akarnokd added the 2.x label Jul 21, 2017
@akarnokd
Copy link
Member

Thanks. The JLS seems to consider such change as binary compatible.

/cc @JakeWharton

@akarnokd akarnokd merged commit 29582f0 into ReactiveX:2.x Jul 21, 2017
@plackemacher plackemacher deleted the remove-unnecessary-delay-generics branch July 21, 2017 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants