-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support unknown fields in clone (#758)
Support unknown fields in the method `Message.clone()`. Extensions are stored as unknown fields on a message, and cloning a message will currently discard any set extension. This behavior is unexpected, since it would be logical that a deep copy includes all properties that were explicitly set, whether it is a regular field, or an extension. This PR fixes this flaw, and includes unknown fields when cloning a message. This also documents equal's behavior of ignoring the unknown fields and extensions.
- Loading branch information
1 parent
a0ba45a
commit 503e2f7
Showing
4 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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