-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Closed
Labels
Description
I'm trying the examples provided in the readme file and in specifically this one I got a compilation error in the map() method (Cannot return a void result) :
Flowable<Inventory> inventorySource = warehouse.getInventoryAsync();
inventorySource.flatMap(inventoryItem ->
erp.getDemandAsync(inventoryItem.getId())
.map(demand
-> System.out.println("Item " + inventoryItem.getName() + " has demand " + demand));
)
.subscribe();
It should be something like this, isn't?:
inventorySource
.flatMap(inventoryItem -> demandService
.getDemandAsync(inventoryItem.getId())
.map(demand -> "Item " + inventoryItem.getName()
+ " has demand " + demand.getQtd()))
.subscribe(System.out::println);