Repository navigation
fix(json): distinguish root and declared codec factory lookups - #4186
Open
mohitjoshi-hey wants to merge 5 commits into
Open
mohitjoshi-hey wants to merge 5 commits into
mohitjoshi-hey wants to merge 5 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mohitjoshi-hey
marked this pull request as ready for review
October 16, 2026 10:23
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mohitjoshi-hey
marked this pull request as draft
October 16, 2026 13:51
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mohitjoshi-hey
marked this pull request as ready for review
October 16, 2026 14:15
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
Issue #4169: a registered JSON codec factory could not reliably distinguish a root lookup from a declared or field lookup. A declined root lookup could be repeated as a declared lookup with
runtimeType=false, and the cached fallback could suppress later declared factory resolution.What does this PR do?
runtimeType=truelookup.runtimeType=false.Validation:
mvn -T1 -pl fory-json -Dtest=JsonModuleTest#factoryDoesNotRequeryDeclinedRoot test— passed (1 passed, 0 failed, 0 errors).runtimeType=truefor the root lookup andruntimeType=falsefor the later declared lookup.JsonModuleTestrun was attempted, but two existing tests encounteredNoClassDefFoundError: org/apache/fory/json/JsonTestSupportduring Java 9 test-classpath setup. The issue-specific regression test passes independently.Result:
Related issues
Fixes #4169
AI Contribution Checklist
yesyes, I included a completed AI Contribution Checklist and the required AI Usage Disclosure.yes, my PR description includes the requiredai_reviewsummary and final clean review result from both required reviewers.AI Usage Disclosure
java/fory-jsontype resolution, shared codec registry, andJsonModuleTest9cd292fd4; the final Fory-guided review reported no actionable findings after re-checking the outer resolution transaction, and the final independent review reported no actionable findings.Completed AI Review Checklist
yesyes, I included the standardized AI Usage Disclosure above.yes, I can explain and defend all important changes without AI help.yes, I reviewed AI-assisted code changes line by line.yes, I completed line-by-line self-review first and fixed issues before requesting AI review.yes, I ran two fresh AI review agents on the current PR diff or current HEAD after the latest code changes: one Fory-guided reviewer and one independent general reviewer.yes, I addressed all actionable AI review comments and repeated the review loop until both AI reviewers reported no further actionable comments.yes, I recorded the final clean-review results from both reviewers above.yes, I ran a focused test command and recorded its result above.yes, I added a regression test for the reported issue.yes, I validated protocol and performance impacts; no binary protocol change was introduced.yes, I verified licensing and provenance compliance.Does this PR introduce any user-facing change?
This PR does not introduce any user-facing API, binary protocol, or cross-runtime behavior change.
Benchmark
Not applicable. This is a resolver correctness fix and does not change serialization wire encoding or a serialization hot path.