mandrean opened a new pull request, #3628:
URL: https://github.com/apache/fory/pull/3628

   ## Why?
   
   Eclipse Collections `UnifiedMap` implements `Externalizable` and stores 
entries outside normal serializable fields. In Java compatible mode, Fory 
classified it as a `Map` first and used the default Java map serializer, which 
serialized container metadata but dropped the actual entries when the field 
type was `MutableMap`.
   
   This reproduces and fixes the data loss reported in #3621.
   
   ## What does this PR do?
   
   - Adds a regression test covering a holder with an Eclipse Collections 
`MutableMap<String, String>` field initialized with `UnifiedMap` in Java 
compatible mode, with and without codegen.
   - Treats `Externalizable` map and collection implementations as 
JDK-compatible containers when resolving serializers.
   - Updates the compatible map/collection wrappers to delegate 
`Externalizable` containers to `ExternalizableSerializer`, preserving their 
`writeExternal` / `readExternal` behavior.
   
   ## Related issues
   
   - Fixes #3621
   
   ## AI Contribution Checklist
   
   <!-- Full requirements and disclosure template:
   
https://github.com/apache/fory/blob/main/AI_POLICY.md#9-contributor-checklist-for-ai-assisted-prs
 -->
   
   - [x] Substantial AI assistance was used in this PR: `yes`
   - [x] If `yes`, I included a completed [AI Contribution 
Checklist](https://github.com/apache/fory/blob/main/AI_POLICY.md#9-contributor-checklist-for-ai-assisted-prs)
 in this PR description and the required `AI Usage Disclosure`.
   - [ ] If `yes`, my PR description includes the required `ai_review` summary 
and screenshot evidence of the final clean AI review results from both fresh 
reviewers on the current PR diff or current HEAD after the latest code changes.
   
   AI Usage Disclosure
   - substantial_ai_assistance: yes
   - scope: issue investigation, test drafting, code change drafting, 
validation command selection, PR description drafting
   - affected_files_or_subsystems: Java serializer resolution and compatible 
collection/map serializers; Java testsuite Eclipse Collections regression 
coverage
   - ai_review: line-by-line self-review completed locally; required 
two-fresh-reviewer loop is pending, so this PR is opened as draft until final 
clean review evidence can be attached
   - ai_review_artifacts: pending; screenshot evidence or persisted links for 
both fresh final clean AI reviews will be added before marking ready for 
maintainer review
   - human_verification: reviewed local diffs and ran focused Java validation 
successfully: `mvn -s <empty-settings> -pl fory-testsuite -am 
-Dtest=org.apache.fory.test.EclipseCollectionsTest 
-Dsurefire.failIfNoSpecifiedTests=false test`; nearby serializer/resolver tests 
successfully with US locale: `mvn -s <empty-settings> -pl fory-core -am 
-Dtest=org.apache.fory.resolver.ClassResolverTest,org.apache.fory.serializer.collection.MapSerializersTest,org.apache.fory.serializer.collection.CollectionSerializersTest,org.apache.fory.serializer.ObjectStreamSerializerTest
 -Dsurefire.failIfNoSpecifiedTests=false test`; style checks successfully: `mvn 
-s <empty-settings> -pl fory-core,fory-testsuite -am -DskipTests spotless:check 
checkstyle:check`
   - performance_verification: N/A; correctness fix for `Externalizable` 
container serializer selection in compatible mode, no benchmark run
   - provenance_license_confirmation: Apache-2.0-compatible provenance 
confirmed; no incompatible third-party code introduced
   
   ## 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
   
   Not run. This is a correctness fix for existing `Externalizable` 
map/collection compatible-mode behavior and does not intentionally change 
public APIs or binary protocol format.
   


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