Browse Source

Early exit on empty sets.

combat-2
MagicBot 9 months ago
parent
commit
bd2547046a
  1. 5
      src/engine/gameManager/DbManager.java

5
src/engine/gameManager/DbManager.java

@ -273,6 +273,11 @@ public enum DbManager {
EnumSet<E> enumSet = EnumSet.noneOf(enumClass); EnumSet<E> enumSet = EnumSet.noneOf(enumClass);
// Early exit for empty sets
if (mysqlSet.isEmpty())
return enumSet;
// Remove the leading and trailing brackets from the MySQL set // Remove the leading and trailing brackets from the MySQL set
mysqlSet = mysqlSet.substring(1, mysqlSet.length() - 1); mysqlSet = mysqlSet.substring(1, mysqlSet.length() - 1);

Loading…
Cancel
Save