| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This avoids a race-condition when cachedSize is momentarily set to 0
for non-empty messages if multiple threads call getSerializedSize
(e.g. during serialization).
Change-Id: I15a8ded92edbf41bf1c8d787960c5bbbc8a323c5
|
|\ |
|
|/
|
|
|
|
|
|
| |
Add #<include> istream to message.cc which was the solution to this bug:
https://code.google.com/p/protobuf/issues/detail?id=570
Change-Id: Ic63730fdbe73234bf7efdd50ff0b55bb11ca0fd4
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Get rid of TypeLiteral<T>. It was introduced to read the component
type of a List<T> at runtime. But we use arrays everywhere else,
and we can always read the component type of an array type at
runtime.
- Properly read/write "minor" types (e.g. sint32, sfixed32). The old
implementation could only read/write data as the "typical" types
(one per Java type), e.g. java.lang.Integer -> int32, java.lang.Long
-> int64. So if e.g. an extension specifies sfixed32 as the type, it
would be read/written in the totally incompatible int32 format.
- Properly serialize repeated packed fields. The old implementation
doesn't do packed serialization. As an added bonus, and to be more
aligned with the rest of protobuf nano / main, repeated packable
extensions can deserialize both packed and non-packed data.
- Split Extension class into a hierarchy so under typical usage a
large chunk of code dealing with primitive type extensions can be
removed by ProGuard.
Bug: https://code.google.com/p/android/issues/detail?id=62586
Change-Id: I0d692f35cc2a8ad3a5a1cb3ce001282b2356b041
|
|\ \
| | |
| | |
| | |
| | |
| | | |
* changes:
Fix repeated packed field merging code for non-packed data.
Add validation when parsing enum fields.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Enum fix is already included in the previous commit.
Bug: https://code.google.com/p/android/issues/detail?id=64893
Change-Id: I9fecff3c8822918a019028eb57fa39b361a2c960
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Invalid values from the wire are silently ignored.
Unlike full/lite, the invalid values are not stored into the
unknown fields, because there's no way to get them out from
Nano's unknown fields without a matching Extension.
Edited README and slightly moved it towards a standalone
section for Nano, independent of the Micro section.
Change-Id: I2c1eb07f4d6d8f3aea242b8ddd95b9c966f3f177
|
|\ \ |
|
|/ /
| |
| |
| |
| |
| | |
So we don't need to keep all option in a single line in the .mk files.
Change-Id: I786b879b334cac4cd13b32fabcb76efe53b4ac80
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Special values for float and double make it inaccurate to test the equality with ==.
The main Java library uses the standard Object.equals() implementation for all fields,
which for floating point fields means Float.equals() or Double.equals(). They define
equality as bitwise equality, with all NaN representations normalized to the same bit
sequence (and therefore equal to each other). This test checks that the nano
implementation complies with Object.equals(), so NaN == NaN and +0.0 != -0.0.
Change-Id: I97bb4a3687223d8a212c70cd736436b9dd80c1d7
|
|\ \ \
| |/ /
| | /
| |/
|/| |
|
|/
|
|
| |
Change-Id: Ibbe944fff83e44a8f2206e18ee9ec6f10661297a
|
|\ |
|
|/
|
|
|
|
|
|
|
| |
accessors mode switches proto fields away from being public fields (which is
how MessageNanoPrinter found which fields to print via reflection). Add a
pass through the methods looking for generated accessor methods to print
those as well.
Change-Id: I7c47853ecbd5534086f44b25a89dbbe56f63ed03
|
|\ |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Class initializers prevent ProGuard from inlining any methods
because it thinks the class initializer may have side effects.
This is true for static methods, but instance methods can still
be inlined, because to have an instance you will have touched
the class and any class initializers would have run. But
ProGuard only starts inlining instance methods of classes with
class initializers from v4.11b6, and Android uses v4.4 now.
This change tries to avoid the class initializers as much as
possible, by delaying the initialization of the empty array and
some fields' saved defaults until when they're needed. However,
if the message hosts any extensions, they must be public static
final and therefore introducing the class initializer. In that
case we won't bother with lazy initialization.
Change-Id: I00d8296f6eb0023112b93ee135cdb28dbd52b0b8
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For nested message objects, don't generate accessor methods because they have
a default value that is not a valid value (null), so there is no reason to have
get/set/has/clear methods for them. Clients and protos (while serializing) can
check against the invalid value to see if it's been set.
Change-Id: Ic63400889581271b8cbcd9c45c84519d4921fd4b
|
|\ \
| |/
|/| |
|
| |\
| | |
| | |
| | |
| | |
| | |
| | | |
TextFormat."
* commit '3e0d99fab8c1da2a8f36637b7bf5e8581143e36a':
Update MessageNano#toString() to return mostly valid TextFormat.
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
* commit '332076f08a9d46b772fee755832a0e09dd8cb6aa':
Fix warnings warnings in header files, hide others.
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
* commit 'ac8e2e150716784a707587ae6e2c8b3a291a2ae7':
Minimize method count for nanoproto.
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* commit '8a15121c1077fe883f428bd27dee6b99e06e48b6':
Allow for ref-type arrays containing null elements.
|
| |\ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
option."
* commit 'bb971d53626cb286f8dc491c15d2731001c4891b':
Implement hashCode() and equals() behind a generator option.
|
|\ \ \ \ \ \ \
| |/ / / / / / |
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
* commit '42be1e79ccd670be36220222936aa7cacc6856f6':
Feature request: set() and clear() accessors return this
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
* commit 'c50f605c572a425b2fa696fedc5e61ac6f66d2a9':
Make generated code more aligned with Google Java style.
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
* commit 'afaf74ce55f4aff63dc30e7045a7cd6c1cf232dc':
Fix repeated field merging semantics.
|
| |\ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
* commit '63e819adbb4d2d8215f5d3d8297dc50bf2fe3329':
Protect against null repeated fields.
|
| |\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
tomerge
* commit 'c85806baedfc98ad5759a990b35ea5b5f1ac4edb':
|
| | |\ \ \ \ \ \ \ \ \ \ |
|
| |\ \ \ \ \ \ \ \ \ \ \ \
| | |_|/ / / / / / / / / /
| |/| | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
* commit '39cee9f1f5cd513a53ac5100eb208ed431f99af0':
Remove all field initializers and let ctor call clear().
|
| |\ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
* commit 'cbb08132821cb56f4e6c5e5f8a0b32f51879782a':
Add missing README parts for enum_style and in-repo usage
|
| |\ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
* commit 'c4a1b547c91178d79f5d2cc2e00b8be922c22fe8':
Add reftypes field generator option.
|
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
* commit '44cbb06c725fbba00464bba9f19dc0ea295406b1':
Fix some indenting issues with set__() function
|
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | |
are enabled."
* commit '9827c718c45cfa1744a3b0f8fc27dac9cd415603':
Fix roundtrip failure with groups when unknown fields are enabled.
|
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | |
* commit '44dc2f1eaead8d95d3f5a4f80f9da87852053bfb':
Implement enum_style=java option.
|
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | |
* commit '0d035e9b3485d26df106ff9118705d8476466674':
Accessor style for optional fields.
|
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | |
* commit 'cc652daaec7fc6ebf8b12d361444364da257988b':
Add some bitfield helper methods from 2.4
|
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | |
* commit '9e6afdf96f98259f89aad66367954a247b3e7817':
Add two codegen parameters to nano.
|
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | |_|_|_|_|_|_|_|_|_|/ / / / / / / / / /
| |/| | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | |
* commit '11c3b27d':
Add a Gradle build file for the protobuf libraries.
Change-Id: Id785093c51eb423576292994a98d42efbbc3fddb
|
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | |
unittest_enum_mulitplejava_nano.proto."
* commit 'ece98e5f6728a937c8d32d342f3b1b037a611f3e':
Fix checkbuild targets, remove unittest_enum_mulitplejava_nano.proto.
|
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
* commit 'e7b778b99f607460ed9ea88a13ec91164cda8537':
Fix outer classname for javamicro/javanano.
|
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | |
* commit '87c8e31b8c0baa78f979863a9ed10654a1cdca1f':
Fixed packed repeated serialization.
|
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | |
* commit 'be47f55e2f93df84abb55759e49cf381d2745cc5':
Add an option to inspect "has" state upon parse.
|
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | |
* commit '021f8f1badf1c4db519e3f35d600dec4b5c52eff':
Add test for passing in proto params.
|
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | |
* commit 'ac5a239e7d90613cb9404098b70c036a52531a74':
Per-file java_multiple_files flag.
|
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | |
* commit '3099f911382d143d9b702d36e5e52d2f37d8edd9':
Allow NaN/+inf/-inf defaults in micro/nano.
|