- 17 Sep, 2014 2 commits
-
-
Brian Duff authored
-
Jason Neufeld authored
In the current implementation, a message with the same amount of null or equal-valued fields as a different message type will have the same hashCode. This adds more variety by including the hashCode of the class's name in the hashCode calculations. Change-Id: I284e3e6d198ad8037815948d1f65686465ffd623 Signed-off-by: Jason Neufeld <jneufeld@google.com>
-
- 03 Sep, 2014 2 commits
-
-
Brian Duff authored
-
Brian Duff authored
Change-Id: Ibfda5bb1ac3150ea90d82a152730be76a2f8bf71
-
- 02 Sep, 2014 2 commits
-
-
Brian Duff authored
-
Brian Duff authored
Allows two messages to be compared directly for equality without generating an equals method for every generated message. (Ports CL58125010) Change-Id: I92ab5088539d1fd722fee7b5e28a8c825926c3b6
-
- 29 Aug, 2014 2 commits
-
-
Max Cai authored
-
Linus Tufvesson authored
- Now with 50% less '&' and 100% fewer build breakages! Change-Id: Icf0283220f75cd14b8564b51bd55973e5b7da56b
-
- 28 Aug, 2014 4 commits
-
-
Max Cai authored
-
Max Cai authored
This reverts commit 8b8481868877c9db407d04bdf4843e50d8920806. Change-Id: I0876235b79cd7745312879d0f1b00c6d1c1a1b7a
-
Max Cai authored
-
Linus Tufvesson authored
Change-Id: Ia848d7fae9aeab89e65b00f05cee6c1e6d649d94
-
- 05 Aug, 2014 1 commit
-
-
Max Cai authored
-
- 29 Jul, 2014 1 commit
-
-
Leandro Gracia Gil authored
-
- 28 Jul, 2014 1 commit
-
-
Leandro Gracia Gil authored
Allows aprotoc.exe to be cross-compiled when building the Windows SDK. Change-Id: I7e1eec945b5578e1fe6c368b128fe1f9396f491c
-
- 21 Jul, 2014 2 commits
-
-
Brian Duff authored
-
Brian Duff authored
The behavior of the string ctor is undefined when you pass NULL. This is checked strictly in C++11, so fails to compile. Change-Id: Id5e0984ad1d37f2d504f7c42ac23e52ed4a58903
-
- 17 Jul, 2014 2 commits
-
-
Max Cai authored
-
Juan Silveira authored
It allows checking for the presence of an extension without having to deserialize the field. Change-Id: Id542d20274b2435b7bc2b322740e9984cb8639a1
-
- 14 Jul, 2014 1 commit
-
-
Max Cai authored
-
- 15 Jul, 2014 1 commit
-
-
Max Cai authored
Instead of publishing its class I chose to encapsulate the troublesome references in equals()/hashCode() in the generated code into superclass methods in ExtendableMessageNano. Changed a couple of java packages in the test suite to catch this issue easier in the future. Change-Id: I43f88411f63bb6f3ffc8d63361f2f77bebf6220a
-
- 14 Jul, 2014 2 commits
-
-
Max Cai authored
-
Juan Silveira authored
The current implementation of getExtension deserialises the field from bytes and returns a new object every time. This means that changes to those objects are reflected when the messages is serialised unless setExtension is called. It also means that every call to getExtension and setExtension is expensive. This change introduces a FieldData class that contains everything that's known about the field at the time. This can be all the tag/byte[] pairs associated with a given field or an Extension and a value object. This is so that two messages with a repeated extension can be compared even if the extension has been deserialised in one of them but not the other. This change also adds FieldArray class based on SparseArray from the Android compatibility library. This is used in ExtendableMessageNano to make lookup of FieldDatas by their field number faster. Implications: * calling getExtension multiple times deserialises the field only once and returns the same object. * calling setExtension doesn't cause the object to be serialised immediately, that only happens when the container message is serialised. * getExtension is no longer a read-only thread-safe operation. README.txt has been updated to relfect that. * comparison using equals and hashCode continues to work. Bug: 10863158 Change-Id: I81c7cb0c73cc0611a1f7c1eabf5eed259738e8bc
-
- 03 Jul, 2014 1 commit
-
-
Max Cai authored
Change-Id: I01921eff008a8e3f7b1fbeb653d15ff8038d3220
-
- 02 May, 2014 3 commits
- 01 May, 2014 3 commits
-
-
Jan-Willem Maarse authored
* commit 'd20f0a4260763531acf5de677e4830afe0bfc53e': Fix NPE when clearing an extension in nano protos
-
Jan-Willem Maarse authored
-
Jan-Willem Maarse authored
If ExtendableMessageNano doesn't have any unknown fields, trying to clear an extension by setting it to null would throw an NPE. Change-Id: I6abcdfcc0193de44f97b21dd6cc2f40604938a1a
-
- 29 Apr, 2014 1 commit
-
-
Bill Yi authored
-
- 25 Apr, 2014 2 commits
-
-
Jeff Davidson authored
-
Jeff Davidson authored
This CL adds the "parcelable_messages" option. When enabled, all generated message classes will conform to the Android Parcelable contract. This is achieved by introducing a new parent class for generated classes which implements the required functionality. Since the store_unknown_fields option also makes use of a superclass, ExtendableMessageNano, we have two versions of the new Parcelable superclass: one extending MessageNano, and one extending ExtendableMessageNano. These classes are otherwise identical. As these classes depend on Android framework jars, they are not included in the host .jar build of the nanoproto library. Finally, add a test suite for running tests of Android-specific functionality, as this cannot be done on a desktop JVM. Change-Id: Icc2a257f03317e947f7078dbb9857c3286857497
-
- 24 Apr, 2014 1 commit
-
-
Max Cai authored
-
- 23 Apr, 2014 1 commit
-
-
Jie Dai authored
Nano proto compiler normally throws an error if any service is defined. If --ignore-services=true is set, no error is thrown and the service is simply skipped. Change-Id: Id82583555085cc55550d03a485d3f0189885240b
-
- 14 Apr, 2014 1 commit
-
-
Max Cai authored
-
- 10 Apr, 2014 1 commit
-
-
Dave Hawkey authored
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). This is a retry of https://android-review.googlesource.com/#/c/88570/. getSerializedSize() has been kept non-final so that messages generated with a previous version of the compiler will not break. Change-Id: I8d8154a10938cde579ae19c55eae55b1e70e0bda
-
- 22 Mar, 2014 3 commits
-
-
Wink Saville authored
* commit 'ce2f59915e0b41c935e3f72a2b7b71b6c19b6860': Revert "Don't reset cachedSize to 0 in getSerializedSize"
-
Wink Saville authored
-
Wink Saville authored
This reverts commit c6e12c6702ca764486f952654ba1568f00efe813.
-