• jasonh+personal@google.com's avatar
    Fix Issue 136: the memoized serialized size for packed fields may not · 9951233e
    jasonh+personal@google.com authored
    be properly set. writeTo() may be invoked without a call to
    getSerializedSize(), so the generated serialization methods would
    write a length of 0 for non-empty packed fields. Just call
    getSerializedSize() at the beginning of writeTo(): although this
    means that we may compute the byte size needlessly when there
    are no packed fields, in practice, getSerializedSize() will
    already have been called - all of the writeTo() wrappers in
    AbstractMessageLite invoke it.
    
    Tested: new unittest case in WireFormatTest.java now passes
    9951233e
Name
Last commit
Last update
..
compiler Loading commit data...
io Loading commit data...
stubs Loading commit data...
testdata Loading commit data...
testing Loading commit data...
SEBS Loading commit data...
descriptor.cc Loading commit data...
descriptor.h Loading commit data...
descriptor.pb.cc Loading commit data...
descriptor.pb.h Loading commit data...
descriptor.proto Loading commit data...
descriptor_database.cc Loading commit data...
descriptor_database.h Loading commit data...
descriptor_database_unittest.cc Loading commit data...
descriptor_unittest.cc Loading commit data...
dynamic_message.cc Loading commit data...
dynamic_message.h Loading commit data...
dynamic_message_unittest.cc Loading commit data...
extension_set.cc Loading commit data...
extension_set.h Loading commit data...
extension_set_heavy.cc Loading commit data...
extension_set_unittest.cc Loading commit data...
generated_message_reflection.cc Loading commit data...
generated_message_reflection.h Loading commit data...
generated_message_reflection_unittest.cc Loading commit data...
generated_message_util.cc Loading commit data...
generated_message_util.h Loading commit data...
lite_unittest.cc Loading commit data...
message.cc Loading commit data...
message.h Loading commit data...
message_lite.cc Loading commit data...
message_lite.h Loading commit data...
message_unittest.cc Loading commit data...
package_info.h Loading commit data...
reflection_ops.cc Loading commit data...
reflection_ops.h Loading commit data...
reflection_ops_unittest.cc Loading commit data...
repeated_field.cc Loading commit data...
repeated_field.h Loading commit data...
repeated_field_unittest.cc Loading commit data...
service.cc Loading commit data...
service.h Loading commit data...
test_util.cc Loading commit data...
test_util.h Loading commit data...
test_util_lite.cc Loading commit data...
test_util_lite.h Loading commit data...
text_format.cc Loading commit data...
text_format.h Loading commit data...
text_format_unittest.cc Loading commit data...
unittest.proto Loading commit data...
unittest_custom_options.proto Loading commit data...
unittest_embed_optimize_for.proto Loading commit data...
unittest_empty.proto Loading commit data...
unittest_enormous_descriptor.proto Loading commit data...
unittest_import.proto Loading commit data...
unittest_import_lite.proto Loading commit data...
unittest_lite.proto Loading commit data...
unittest_lite_imports_nonlite.proto Loading commit data...
unittest_mset.proto Loading commit data...
unittest_optimize_for.proto Loading commit data...
unknown_field_set.cc Loading commit data...
unknown_field_set.h Loading commit data...
unknown_field_set_unittest.cc Loading commit data...
wire_format.cc Loading commit data...
wire_format.h Loading commit data...
wire_format_lite.cc Loading commit data...
wire_format_lite.h Loading commit data...
wire_format_lite_inl.h Loading commit data...
wire_format_unittest.cc Loading commit data...