ServiceFuture.fromBody(Completable, ServiceCallback) does not assign value to subscription class variable.
https://github.com/Azure/autorest-clientruntime-for-java/blob/master/client-runtime/src/main/java/com/microsoft/rest/ServiceFuture.java#L129-L150
Then ServiceFuture.cancel() calls subscription.unsubscribe() which produces NullPointerException, as subscription is null.
The correct code should be serviceFuture.subscription = completable.subscribe(...
Temporary workaround, avoid calling ServiceFuture.fromBody(Completable, ServiceCallback). Use other factory method e.g. ServiceFuture.fromBody(Observable, ServiceCallback).
ServiceFuture.fromBody(Completable, ServiceCallback)does not assign value tosubscriptionclass variable.https://github.com/Azure/autorest-clientruntime-for-java/blob/master/client-runtime/src/main/java/com/microsoft/rest/ServiceFuture.java#L129-L150
Then
ServiceFuture.cancel()callssubscription.unsubscribe()which produces NullPointerException, assubscriptionisnull.The correct code should be
serviceFuture.subscription = completable.subscribe(...Temporary workaround, avoid calling
ServiceFuture.fromBody(Completable, ServiceCallback). Use other factory method e.g.ServiceFuture.fromBody(Observable, ServiceCallback).