@@ -0,0 +1,1537 @@
+package bisq.common.util;/*%0A * This file is part of Bisq.%0A *%0A * Bisq is free software: you can redistribute it and/or modify it%0A * under the terms of the GNU Affero General Public License as published by%0A * the Free Software Foundation, either version 3 of the License, or (at%0A * your option) any later version.%0A *%0A * Bisq is distributed in the hope that it will be useful, but WITHOUT%0A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or%0A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public%0A * License for more details.%0A *%0A * You should have received a copy of the GNU Affero General Public License%0A * along with Bisq. If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A */%0A%0Aimport java.util.List;%0Aimport java.util.concurrent.CompletableFuture;%0Aimport java.util.stream.Collectors;%0A%0Apublic class CompletableFutureUtils %7B%0A    /**%0A     * @param list List of futures%0A     * @param %3CT%3E  The generic type of the future%0A     * @return Returns a CompletableFuture with a list of the futures we got as parameter once all futures%0A     * are completed (incl. exceptionally completed).%0A     */%0A    public static %3CT%3E CompletableFuture%3CList%3CT%3E%3E allOf(List%3CCompletableFuture%3CT%3E%3E list) %7B%0A        CompletableFuture%3CVoid%3E allFuturesResult = CompletableFuture.allOf(list.toArray(new CompletableFuture%5Blist.size()%5D));%0A        return allFuturesResult.thenApply(v -%3E%0A                list.stream().%0A                        map(CompletableFuture::join).%0A                        collect(Collectors.%3CT%3EtoList())%0A        );%0A    %7D%0A%7D%0A

Add CompletableFutureUtils