From 8756b86524d6ce1f1e267aca5d9f5c67c37721ca Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Tue, 3 Oct 2023 06:50:59 +0700 Subject: [PATCH] isEmpty --- .../chayapak/chomens_bot/util/PersistentDataUtilities.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/util/PersistentDataUtilities.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/util/PersistentDataUtilities.java index 871567e..2d606bb 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/util/PersistentDataUtilities.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/util/PersistentDataUtilities.java @@ -34,7 +34,7 @@ public class PersistentDataUtilities { future = Main.executor.scheduleAtFixedRate(() -> { // TODO: thread-safe try { - if (queue.size() == 0) return; + if (queue.isEmpty()) return; final Map.Entry entry = queue.entrySet().iterator().next(); // is this the best way to get the first item of the map?