I would like to know if there is any difference in the behavior between those both methods or if it's just a matter of style:
private Single<JsonObject> foo() {
return Single.just(new JsonObject()).flatMap(next -> Single.just(next));
}
private Single<JsonObject> bar() {
return Single.just(new JsonObject()).map(next -> next);
}