From 8c35c89bf5ca8e3d87cf1358a2b89521671df4fc Mon Sep 17 00:00:00 2001 From: "Breno A." Date: Sun, 9 Jun 2024 09:09:45 -0300 Subject: [PATCH] refactor: replace Collections.sort with list.sort Collections.sort is just a wrapper, so it is better to use an instance method directly. --- src/main/java/emu/grasscutter/game/mail/MailHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/emu/grasscutter/game/mail/MailHandler.java b/src/main/java/emu/grasscutter/game/mail/MailHandler.java index 51ca53698..ab68b6bc6 100644 --- a/src/main/java/emu/grasscutter/game/mail/MailHandler.java +++ b/src/main/java/emu/grasscutter/game/mail/MailHandler.java @@ -65,7 +65,7 @@ public class MailHandler extends BasePlayerManager { public void deleteMail(List mailList) { List sortedMailList = new ArrayList<>(); sortedMailList.addAll(mailList); - Collections.sort(sortedMailList, Collections.reverseOrder()); + sortedMailList.sort(Collections.reverseOrder()); List deleted = new ArrayList<>();