This can be an in-line return

This commit is contained in:
Keir Nellyer 2016-08-31 15:04:15 +01:00
parent 41bae9d5f8
commit 04432d44d7

View File

@ -103,7 +103,7 @@ public class ReportManager
int reporterId = _clientManager.Get(reporter).getAccountId();
int suspectId = _clientManager.Get(suspect).getAccountId();
CompletableFuture<Report> future = _reportRepository.getOngoingReport(suspectId, category)
return _reportRepository.getOngoingReport(suspectId, category)
.thenCompose(reportIdOptional ->
reportIdOptional.isPresent() ? _reportRepository
.getReport(reportIdOptional.get()) : CompletableFuture
@ -134,8 +134,6 @@ public class ReportManager
saveReport(report).join();
}
});
return future;
}
/**