andrei-ivanov commented on a change in pull request #451: CXF-7854: Refactor
RxJava2 Flowable and Observable Rx Invokers to not…
URL: https://github.com/apache/cxf/pull/451#discussion_r221630991
##########
File path:
rt/rs/extensions/rx2/src/main/java/org/apache/cxf/jaxrs/rx2/client/FlowableRxInvokerImpl.java
##########
@@ -148,33 +151,122 @@ public FlowableRxInvokerImpl(WebClient wc,
ExecutorService ex) {
@Override
public <T> Flowable<T> method(String name, Entity<?> entity, Class<T>
responseType) {
if (sc == null) {
- return Flowable.fromFuture(wc.async().method(name, entity,
responseType));
+ return Flowable.create(new FlowableOnSubscribe<T>() {
Review comment:
If these 2 objects are the same and the only difference is the
`subscribeOn`+`observerOn` when `sc != null`, in my opinion it would look nicer
to create the `Flowable` just once and then apply the logic on it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services