From 7f0c6e067b9094dc502b2402fdc2277d393d335c Mon Sep 17 00:00:00 2001 From: Galster-dev <46283010+Galster-dev@users.noreply.github.com> Date: Sun, 17 Dec 2023 01:26:04 +0300 Subject: [PATCH] Fix serializer stack inheritance check --- .../net/elytrium/serializer/language/reader/AbstractReader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/elytrium/serializer/language/reader/AbstractReader.java b/src/main/java/net/elytrium/serializer/language/reader/AbstractReader.java index 8f53924..297b1f8 100644 --- a/src/main/java/net/elytrium/serializer/language/reader/AbstractReader.java +++ b/src/main/java/net/elytrium/serializer/language/reader/AbstractReader.java @@ -156,7 +156,7 @@ protected Type fillSerializerStack(Deque> serializerS Type type = null; while (true) { ClassSerializer classSerializer = this.config.getRegisteredSerializer(clazz); - if (classSerializer == null || !clazz.isAssignableFrom(classSerializer.getToClass())) { + if (classSerializer == null || !classSerializer.getToClass().isAssignableFrom(clazz)) { break; }