Skip to content

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

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

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

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