Prevent double exception logging

This commit is contained in:
Keir Nellyer 2016-09-30 01:16:30 +01:00
parent 45eeac8cee
commit 4818936943
2 changed files with 3 additions and 7 deletions

View File

@ -579,11 +579,7 @@ public class ReportManager
return Optional.ofNullable(report);
});
future.exceptionally(throwable ->
{
_plugin.getLogger().log(Level.SEVERE, "Error getting the report account is handling.", throwable);
return Optional.empty();
});
future.exceptionally(throwable -> Optional.empty());
return future;
}

View File

@ -39,9 +39,9 @@ public class ReportHandleCommand extends CommandBase<ReportPlugin>
ReportRepository reportRepository = reportManager.getReportRepository();
int accountId = _commandCenter.GetClientManager().getAccountId(player);
reportManager.isHandlingReport(player).thenAccept(isHandlingReport ->
reportManager.isHandlingReport(player).thenAccept(handlingReport ->
{
if (!isHandlingReport)
if (!handlingReport)
{
Map<Report, Double> reportPriorities = Collections.synchronizedMap(new HashMap<>());
boolean devMode = reportManager.isDevMode(player.getUniqueId());