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

chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fury.git


The following commit(s) were added to refs/heads/main by this push:
     new beb0797b fix(java): Fix memory leak in `StructSerializer.xread()` 
caused by re-pushing instead of popping `GenericType`. (#1768)
beb0797b is described below

commit beb0797bb0ec63bcf19f9dff153085b548a0c0a7
Author: Mitsunori Komatsu <[email protected]>
AuthorDate: Sat Jul 27 17:21:21 2024 +0900

    fix(java): Fix memory leak in `StructSerializer.xread()` caused by 
re-pushing instead of popping `GenericType`. (#1768)
    
    ## What does this PR do?
    
    Fix memory leak in `StructSerializer.xread()` caused by re-pushing
    instead of popping `GenericType`.
    
    ## Related issues
    
    None, probably.
    
    ## Does this PR introduce any user-facing change?
    
    - [ ] Does this PR introduce any public API change?
    - [ ] Does this PR introduce any binary protocol compatibility change?
    
    ## Benchmark
    
    N/A
---
 .../src/main/java/org/apache/fury/serializer/StructSerializer.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/java/fury-core/src/main/java/org/apache/fury/serializer/StructSerializer.java 
b/java/fury-core/src/main/java/org/apache/fury/serializer/StructSerializer.java
index e37d203b..5e1399bc 100644
--- 
a/java/fury-core/src/main/java/org/apache/fury/serializer/StructSerializer.java
+++ 
b/java/fury-core/src/main/java/org/apache/fury/serializer/StructSerializer.java
@@ -189,7 +189,7 @@ public class StructSerializer<T> extends Serializer<T> {
       Object fieldValue = fury.xreadRefByNullableSerializer(buffer, 
serializer);
       fieldAccessor.set(obj, fieldValue);
       if (hasGenerics) {
-        generics.pushGenericType(fieldGeneric);
+        generics.popGenericType();
       }
     }
     return obj;


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

Reply via email to