From f3cf4cd96e05d0e08ac2e64bc09f47ca96d37138 Mon Sep 17 00:00:00 2001 From: Joo200 Date: Mon, 14 Aug 2023 21:01:49 +0200 Subject: [PATCH] catch ClassCastException in the ItemDatabase update method (#563) --- src/main/java/com/Acrobot/ChestShop/Metadata/ItemDatabase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/Acrobot/ChestShop/Metadata/ItemDatabase.java b/src/main/java/com/Acrobot/ChestShop/Metadata/ItemDatabase.java index 5ea0878..8900e1f 100644 --- a/src/main/java/com/Acrobot/ChestShop/Metadata/ItemDatabase.java +++ b/src/main/java/com/Acrobot/ChestShop/Metadata/ItemDatabase.java @@ -103,7 +103,7 @@ public class ItemDatabase { item.setBase64ItemCode(Base64.encodeObject(yaml.dump(itemStack))); itemDao.update(item); updated.getAndIncrement(); - } catch (YAMLException e) { + } catch (YAMLException | ClassCastException e) { ChestShop.getBukkitLogger().log(Level.SEVERE, "YAML of the item with ID " + Base62.encode(item.getId()) + " (" + item.getId() + ") is corrupted: \n" + serialized); } }