commit | 5537d6fe4af105eb769bacc530e8d5d9e0b027cb | [log] [tgz] |
---|---|---|
author | Brian Duff <bduff@google.com> | Fri Jan 09 13:32:38 2015 -0800 |
committer | Brian Duff <bduff@google.com> | Fri Jan 09 13:32:38 2015 -0800 |
tree | 798a5b61c9daded298fdbd60d567f88fade89ada | |
parent | c35945d022afb86631adfc746254598c60323f72 [diff] |
When no clear() is generated, still initialize fields. https://android-review.googlesource.com/#/c/67890/ removed field initialization from the ctor, making it just call clear() instead. When I added the generate_clear option back (as part of the reftypes compat mode) in https://android-review.googlesource.com/#/c/109530/, I forgot to ensure that what clear() used to do was inlined in the constructor. This change fixes NPEs that are happening for users of reftypes_compat_mode who rely on unset repeated fields being empty arrays rather than null. Change-Id: Idb58746c60f4a4054b7ebb5c3b0e76b16ff88184