From 02001ad6913dd51e86387a24c18fa755c4ede7ba Mon Sep 17 00:00:00 2001 From: chaokunyang Date: Fri, 27 Dec 2024 17:44:20 +0800 Subject: [PATCH] add missing named type --- .../java/org/apache/fury/resolver/XtypeResolver.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/java/fury-core/src/main/java/org/apache/fury/resolver/XtypeResolver.java b/java/fury-core/src/main/java/org/apache/fury/resolver/XtypeResolver.java index d38902fb08..873d7d0e90 100644 --- a/java/fury-core/src/main/java/org/apache/fury/resolver/XtypeResolver.java +++ b/java/fury-core/src/main/java/org/apache/fury/resolver/XtypeResolver.java @@ -360,7 +360,11 @@ public ClassInfo writeClassInfo(MemoryBuffer buffer, Object obj) { switch (internalTypeId) { case Types.NAMED_ENUM: case Types.NAMED_STRUCT: + case Types.NAMED_COMPATIBLE_STRUCT: + case Types.NAMED_POLYMORPHIC_STRUCT: + case Types.NAMED_POLYMORPHIC_COMPATIBLE_STRUCT: case Types.NAMED_EXT: + case Types.NAMED_POLYMORPHIC_EXT: assert classInfo.packageNameBytes != null; metaStringResolver.writeMetaStringBytes(buffer, classInfo.packageNameBytes); assert classInfo.classNameBytes != null; @@ -379,7 +383,10 @@ public ClassInfo readClassInfo(MemoryBuffer buffer) { case Types.NAMED_ENUM: case Types.NAMED_STRUCT: case Types.NAMED_COMPATIBLE_STRUCT: + case Types.NAMED_POLYMORPHIC_STRUCT: + case Types.NAMED_POLYMORPHIC_COMPATIBLE_STRUCT: case Types.NAMED_EXT: + case Types.NAMED_POLYMORPHIC_EXT: MetaStringBytes packageBytes = metaStringResolver.readMetaStringBytes(buffer); MetaStringBytes simpleClassNameBytes = metaStringResolver.readMetaStringBytes(buffer); return loadBytesToClassInfo(internalTypeId, packageBytes, simpleClassNameBytes); @@ -446,6 +453,8 @@ private ClassInfo populateBytesToClassInfo( case Types.NAMED_ENUM: case Types.NAMED_STRUCT: case Types.NAMED_COMPATIBLE_STRUCT: + case Types.NAMED_POLYMORPHIC_STRUCT: + case Types.NAMED_POLYMORPHIC_COMPATIBLE_STRUCT: type = NonexistentClass.getNonexistentClass( qualifiedName, isEnum(typeId), 0, config.isMetaShareEnabled());