From bd2547046a18350335b1f9f24c537f21e22130bb Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 11 Feb 2024 08:07:22 -0500 Subject: [PATCH] Early exit on empty sets. --- src/engine/gameManager/DbManager.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/engine/gameManager/DbManager.java b/src/engine/gameManager/DbManager.java index 6dc9c392..9cd60359 100644 --- a/src/engine/gameManager/DbManager.java +++ b/src/engine/gameManager/DbManager.java @@ -273,6 +273,11 @@ public enum DbManager { EnumSet enumSet = EnumSet.noneOf(enumClass); + // Early exit for empty sets + + if (mysqlSet.isEmpty()) + return enumSet; + // Remove the leading and trailing brackets from the MySQL set mysqlSet = mysqlSet.substring(1, mysqlSet.length() - 1);