Flattens a nested future. The usage of this method indicates a code smell: a map may have been used instead of flatMap. There are genuine scenarios where flatten is required, though. @param fut the nested future @param the type of the future result @return the flat future
(final Future<Future<T>> fut)
| 190 | * @return the flat future |
| 191 | */ |
| 192 | public static <T> Future<T> flatten(final Future<Future<T>> fut) { |
| 193 | return fut.flatMap(f -> f); |
| 194 | } |
| 195 |