pandalee99 commented on code in PR #2130:
URL: https://github.com/apache/fury/pull/2130#discussion_r2021244039


##########
java/fury-core/src/main/java/org/apache/fury/Fury.java:
##########
@@ -586,6 +553,48 @@ public <T> void xwriteRef(MemoryBuffer buffer, T obj, 
Serializer<T> serializer)
     }
   }
 
+  public void xwriteNonRef(MemoryBuffer buffer, Object obj) {
+    ClassInfo classInfo = xtypeResolver.writeClassInfo(buffer, obj);
+    xwriteData(buffer, classInfo, obj);
+  }
+
+  private void xwriteData(MemoryBuffer buffer, ClassInfo classInfo, Object 
obj) {
+    switch (classInfo.getXtypeId()) {
+      case Types.BOOL:
+        buffer.writeBoolean((Boolean) obj);
+        break;
+      case Types.INT8:
+        buffer.writeByte((Byte) obj);
+        break;
+      case Types.INT16:
+        buffer.writeInt16((Short) obj);
+        break;
+      case Types.INT32:
+      case Types.VAR_INT32:
+        // TODO(chaokunyang) support other encoding

Review Comment:
   You can keep it, but I think it's better not to



-- 
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