This is an automated email from the ASF dual-hosted git repository.

rainyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-hessian-lite.git


The following commit(s) were added to refs/heads/master by this push:
     new 898f3a36 Fix RecordDeserializer by adding null ref at the beginning of 
readObject (#86)
898f3a36 is described below

commit 898f3a3663ff24f7fb26842047df1ef4cbb2b46b
Author: zrlw <[email protected]>
AuthorDate: Mon Jul 28 18:36:38 2025 +0800

    Fix RecordDeserializer by adding null ref at the beginning of readObject 
(#86)
---
 .../java/com/alibaba/com/caucho/hessian/io/RecordDeserializer.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/RecordDeserializer.java
 
b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/RecordDeserializer.java
index be00c1ee..6bff2449 100644
--- 
a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/RecordDeserializer.java
+++ 
b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/RecordDeserializer.java
@@ -64,6 +64,7 @@ public class RecordDeserializer extends AbstractDeserializer {
                              String[] fieldNames)
             throws IOException {
         try {
+            int ref = in.addRef(null);
             Object[] args = new Object[_components.length];
             boolean readedIndex[] = new boolean[_components.length];
             for (String fieldName : fieldNames) {
@@ -84,7 +85,7 @@ public class RecordDeserializer extends AbstractDeserializer {
                 }
             }
             Object obj = _constructor.newInstance(args);
-            in.addRef(obj);
+            in.setRef(ref, obj);
 
             return obj;
         } catch (IOException e) {

Reply via email to