Skip to content

Refactor: Improve map entry parsing in GeneratedMessage.mm#2698

Open
copybara-service[bot] wants to merge 1 commit intomasterfrom
test_895935026
Open

Refactor: Improve map entry parsing in GeneratedMessage.mm#2698
copybara-service[bot] wants to merge 1 commit intomasterfrom
test_895935026

Conversation

@copybara-service
Copy link
Copy Markdown

Refactor: Improve map entry parsing in GeneratedMessage.mm

This change adds validation for map key types and ensures that default values are used for missing key or value fields when parsing map entries from a stream. Error handling is also improved by checking the return value of ReadMapEntryField.

By adding a couple of judicious autoreleases, it also protects us from memory leaks in case of bad maps.

This change adds validation for map key types and ensures that default values are used for missing key or value fields when parsing map entries from a stream. Error handling is also improved by checking the return value of `ReadMapEntryField`.

By adding a couple of judicious autoreleases, it also protects us from memory leaks in case of bad maps.

PiperOrigin-RevId: 895935026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants