chaokunyang commented on code in PR #1663:
URL: https://github.com/apache/incubator-fury/pull/1663#discussion_r1623139137


##########
java/fury-core/src/main/java/org/apache/fury/meta/ClassDefEncoder.java:
##########
@@ -146,36 +135,63 @@ static MemoryBuffer encodeClassDef(
       int currentClassHeader = (fields.size() << 1);
       if (classResolver.isRegistered(type)) {
         currentClassHeader |= 1;
-        buffer.writeVarUint32Small7(currentClassHeader);
-        buffer.writeVarUint32Small7(classResolver.getRegisteredClassId(type));
+        classDefBuf.writeVarUint32Small7(currentClassHeader);
+        
classDefBuf.writeVarUint32Small7(classResolver.getRegisteredClassId(type));
       } else {
-        buffer.writeVarUint32Small7(currentClassHeader);
+        classDefBuf.writeVarUint32Small7(currentClassHeader);
         Class<?> currentType = getType(type, className);
         Tuple2<String, String> encoded = 
Encoders.encodePkgAndClass(currentType);
-        writePkgName(buffer, encoded.f0);
-        writeTypeName(buffer, encoded.f1);
+        writePkgName(classDefBuf, encoded.f0);
+        writeTypeName(classDefBuf, encoded.f1);
       }
-      writeFieldsInfo(buffer, fields);
+      writeFieldsInfo(classDefBuf, fields);
+    }
+    byte[] compressed =
+        classResolver
+            .getFury()

Review Comment:
   I think it's not related to this PR, we can discuss it in another issue



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to