Repository navigation
[java][bidi] Type field-less synthetic map records as Map<String, V> - #18122
Merged
Merged
Conversation
pujagani
self-requested a review
October 7, 2026 11:30
pujagani
approved these changes
Oct 7, 2026
pujagani
left a comment
Contributor
There was a problem hiding this comment.
Looks good. We can do this recursively but it is not needed right now. It might be a good idea to use the JSON decoder that code is now using, it went through few iteration so I understand where this PR is coming from, its not a blocker and I can help do that in the follow up PR.
This was referenced Oct 9, 2026
Merged
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.
Related Issues
Java part of #18106 (Ruby part is #18121)
What does this PR do?
script.NodeProperties.attributes({*text => text}in the CDDL) was generated as an empty nestedNodeProperties.Attributesclass with@WarnOnUnknownFields, so every attribute was dropped on deserialization. It is nowOptional<Map<String, String>>, matching the hand-writtenNodePropertiesAPI on trunk.Implementation Notes
parseFieldrewrites a field's ref to a field-less synthetic map record into the inlinemaptypeRef, soresolveJavaType,serializeExprandimmutableCopyExprall use their existing map branches.resolveRefType(as suggested in the issue) becauseserializeExprandimmutableCopyExprcheck the field's own typeRef formap. Fixing only the resolved type would give the rightMap<String, String>type, but the value would skip the unmodifiable copy and the map serialization path.computeSyntheticChildrenskips these records, so no empty nested class is emitted.script/NodeProperties.java.Additional Considerations
Types of changes