Prevent double exception logging
This commit is contained in:
parent
45eeac8cee
commit
4818936943
@ -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;
|
||||
}
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user