Browse Source

Empty check when reading enum

combat-2
MagicBot 8 months ago
parent
commit
c390ebe0c6
  1. 5
      src/engine/objects/Item.java

5
src/engine/objects/Item.java

@ -153,8 +153,9 @@ public class Item extends AbstractWorldObject {
String flagString = rs.getString("item_flags"); String flagString = rs.getString("item_flags");
for (String itemFlag : flagString.split(";")) if (flagString.isEmpty() == false)
this.flags.add(Enum.ItemFlags.valueOf(itemFlag)); for (String itemFlag : flagString.split(";"))
this.flags.add(Enum.ItemFlags.valueOf(itemFlag));
// Backfill support // Backfill support

Loading…
Cancel
Save