History log of /external/protobuf/src/google/protobuf/compiler/javanano/javanano_message.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c7c25812eb19d080087b71e08bfe35aff9f21433 09-Jan-2015 Brian Duff <bduff@google.com> Merge "When no clear() is generated, still initialize fields."
bcf45045f229edab8c2589c1f561e7b7495a763b 01-Oct-2014 Brian Duff <bduff@google.com> Add clone() method support for nano.

Upstreamed from Another Place (cr/57247854).

Change-Id: I2aaf59544c0f5ae21a51891d8a5eeda1dc722c90
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_message.h
5537d6fe4af105eb769bacc530e8d5d9e0b027cb 09-Jan-2015 Brian Duff <bduff@google.com> 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
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_message.h
ccc48faf20dbf3b3cddcffe78d198876d543529b 16-Oct-2013 Brian Duff <bduff@google.com> Implement hashCode() and equals() behind a generator option.

The option is only called 'generate_equals' because:
- equals() is the main thing; hashCode() is there only to
complement equals();
- it's shorter;
- toString() should not be included in this option because
it's more for debugging and it's more likely to stop
ProGuard from working well.

Also shortened the "has bit" expression; was
((bitField & mask) == mask), now ((bitField & mask) != 0).
Both the Java code and the bytecode are slightly shorter.

Change-Id: Ic309a08a60883bf454eb6612679aa99611620e76
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_message.h
64d8d8f89050c5ada85341f967af391f4716a7cb 15-Mar-2013 Ulas Kirazci <ulas@google.com> Nano protobufs.

Like micro protobufs except:

- No setter/getter/hazzer functions.
- Has state is not available. Outputs all fields != their default.
- CodedInputStream can only take byte[] (not InputStream).
- Repeated fields are in arrays, not ArrayList or Vector.
- Unset messages/groups are null, not "defaultInstance()".
- Required fields are always serialized.

To use:

- Link libprotobuf-java-2.3.0-nano runtime.
- Use LOCAL_PROTOC_OPTIMIZE_TYPE := nano

Change-Id: I7429015b3c5f7f38b7be01eb2d4927f7a9999c80
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_message.h