chaokunyang opened a new pull request, #3533: URL: https://github.com/apache/fory/pull/3533
## Why? This PR addresses the same bug as #3514 and is intended to replace it from a writable fork branch. `ObjectStreamSerializer` can hit the async/generated meta-shared layer path for customized JDK serialization cases such as `TreeSet`/`TreeMap` subclasses. The original failure is tracked in #3515. The JVM-side async fix is necessary, but the final implementation also has to keep the generated layer serializer working for GraalVM native-image runtime. ## What does this PR do? - fixes generated meta-shared layer serializer bootstrap for `ObjectStreamSerializer` - preloads generated layer serializer constructors during GraalVM build time so native-image runtime does not fall back to broken constructor discovery - persists layer `TypeDef` metadata through the GraalVM registry so newly created runtime `Fory` instances can rebuild generated layer serializers correctly - adds GraalVM coverage for a compatible `ObjectStreamSerializer` case using `defaultWriteObject/defaultReadObject` with `TreeSet`/`TreeMap` subclasses This PR supersedes #3514. Closes #3515. ## Related issues - Supersedes #3514 - Closes #3515 ## AI Contribution Checklist - [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`. - [x] If `yes`, I can explain and defend all important changes without AI help. - [x] If `yes`, I reviewed AI-assisted code changes line by line before submission. - [x] If `yes`, I ran adequate human verification and recorded evidence (checks run locally or in CI, pass/fail summary, and confirmation I reviewed results). - [x] If `yes`, I added/updated tests and specs where required. - [x] If `yes`, I validated protocol/performance impacts with evidence when applicable. - [x] If `yes`, I verified licensing and provenance compliance. AI Usage Disclosure - substantial_ai_assistance: yes - scope: implementation, refactor, GraalVM validation, test coverage updates - affected_files_or_subsystems: `java/fory-core` generated meta-shared layer bootstrap, GraalVM runtime registry/bootstrap path, `integration_tests/graalvm_tests` - human_verification: reviewed changes line by line; ran targeted JVM tests, checkstyle, and GraalVM native-image build/runtime validation locally; reviewed all passing results - performance_verification: no formal performance claim is made; the change preserves generated layer serializers on the hot path instead of falling back to interpreter behavior - 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? ## Testing - `ENABLE_FORY_DEBUG_OUTPUT=1 mvn -pl fory-core -am -Dtest=org.apache.fory.serializer.ObjectStreamSerializerTest,org.apache.fory.builder.JITContextTest -Dsurefire.failIfNoSpecifiedTests=false -nsu test` - `mvn -pl fory-core -DskipTests -nsu checkstyle:check` - `mvn -T16 -pl fory-core,fory-graalvm-feature -am install -DskipTests -nsu` - `cd integration_tests/graalvm_tests && mvn -T8 -DskipTests=true -Pnative package` - `cd integration_tests/graalvm_tests && ./target/main` -- 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]
