This can be an in-line return
This commit is contained in:
parent
41bae9d5f8
commit
04432d44d7
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user