How can I return an object or list after using Blocking.get()
method in Ratpack?
Blocking.get(()->
xRepository.findAvailable()).then(x->x.stream().findFirst().get());
Above line returns void - I want to be able to do something like below so that it returns the object in the then clause. I tried adding a return statement but doesn't work.
Object x = Blocking.get(()->
xRepository.findAvailable()).then(x->x.stream().findFirst().get());