From a907a9a3c70123de5ced40bc2e841c8ba346df8e Mon Sep 17 00:00:00 2001 From: hn <72974271+Hen1ng@users.noreply.github.com> Date: Mon, 27 Jan 2025 18:16:06 +0800 Subject: [PATCH] fix(java): chunk map serialize an error (#2030) ## What does this PR do? fix some error new implement of map chunk can not pass all of the unit test in the org.apache.fury.serializer.collection.MapSerializersTest ![image](https://github.com/user-attachments/assets/2af5978d-2ebc-4ad9-9ac2-f90511ed5c59) ![image](https://github.com/user-attachments/assets/edc08cc4-495f-4cbe-9f48-0b8e5bcef10e) I found an error in line 298 of the AbstractMapSequencer file ## Related issues ## Does this PR introduce any user-facing change? none - [ ] Does this PR introduce any public API change? - [ ] Does this PR introduce any binary protocol compatibility change? ## Benchmark none Co-authored-by: hening --- .../fury/serializer/collection/AbstractMapSerializer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/fury-core/src/main/java/org/apache/fury/serializer/collection/AbstractMapSerializer.java b/java/fury-core/src/main/java/org/apache/fury/serializer/collection/AbstractMapSerializer.java index ebad0f9f80..e228876697 100644 --- a/java/fury-core/src/main/java/org/apache/fury/serializer/collection/AbstractMapSerializer.java +++ b/java/fury-core/src/main/java/org/apache/fury/serializer/collection/AbstractMapSerializer.java @@ -295,7 +295,7 @@ private Entry writeJavaChunk( int chunkSizeOffset = buffer.writerIndex() - 1; int chunkHeader = 0; if (keySerializer != null) { - chunkHeader |= VALUE_DECL_TYPE; + chunkHeader |= KEY_DECL_TYPE; } else { keySerializer = writeKeyClassInfo(classResolver, keyType, buffer); }