Simplify handling of optional reason

This commit is contained in:
Keir Nellyer 2016-09-28 10:41:56 +01:00
parent 6f77c05f1e
commit f8ad302d80

View File

@ -280,9 +280,8 @@ public class ReportManager
Bukkit.getScheduler().runTask(_plugin, () ->
{
Optional<String> reasonOptional = reportResult.getReason();
String prefix = getReportPrefix(reportId);
String reason = reasonOptional.isPresent() ? reasonOptional.get() : "No reason specified.";
String reason = reportResult.getReason().orElse("No reason specified.");
if (reportCloser != null)
{