Skip to content

Commit

Permalink
[MODFISTO-432] Fixes from feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
damien-git committed Feb 19, 2024
1 parent 1960d4f commit a5fab36
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,8 @@ private Future<Void> loadFunds(DBConn conn) {
}

private Future<Void> loadBudgets(DBConn conn) {
// NOTE: (Stream<String>) is redundant but needed by the Java compiler
Map<String, Set<String>> fiscalYearIdToFundIds = allTransactions.stream().collect(groupingBy(Transaction::getFiscalYearId,
flatMapping(tr -> (Stream<String>)Stream.of(tr.getFromFundId(), tr.getToFundId()).filter(Objects::nonNull), toSet())));
flatMapping(tr -> Stream.of(tr.getFromFundId(), tr.getToFundId()).filter(Objects::nonNull), toSet())));
if (fiscalYearIdToFundIds.isEmpty()) {
allBudgets = emptyList();
return succeededFuture();
Expand Down

0 comments on commit a5fab36

Please sign in to comment.