2.x: add ParallelTransformer interface, params-validation#5197
2.x: add ParallelTransformer interface, params-validation#5197akarnokd merged 2 commits intoReactiveX:2.xfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## 2.x #5197 +/- ##
============================================
- Coverage 95.96% 95.89% -0.07%
+ Complexity 5683 5682 -1
============================================
Files 621 621
Lines 40611 40611
Branches 5632 5632
============================================
- Hits 38973 38945 -28
- Misses 657 672 +15
- Partials 981 994 +13
Continue to review full report at Codecov.
|
| public final <U> ParallelFlowable<U> compose(Function<? super ParallelFlowable<T>, ParallelFlowable<U>> composer) { | ||
| return RxJavaPlugins.onAssembly(to(composer)); | ||
| public final <U> ParallelFlowable<U> compose(@NonNull ParallelTransformer<T, U> composer) { | ||
| return RxJavaPlugins.onAssembly(composer.apply(this)); |
There was a problem hiding this comment.
Missing check here for composer being null?
| public final <U> U to(Function<? super ParallelFlowable<T>, U> converter) { | ||
| public final <U> U to(@NonNull Function<? super ParallelFlowable<T>, U> converter) { | ||
| try { | ||
| return converter.apply(this); |
There was a problem hiding this comment.
Missing check here for converter being null
There was a problem hiding this comment.
Dereference will throw NPE automatically.
There was a problem hiding this comment.
I'd still check it in order to be consistent and for the better error message knowing what exactly is null.
There was a problem hiding this comment.
Updated this and all other methods.
This PR adds the
ParallelTransformerinterface to match the otherXTransformerinterfaces, adds@NonNullannotations to theParallelFlowableoperators and adds theParallelFlowableclass to the parameter validator test set.