Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Inline unknownFieldData{Equals,HashCode} to generated code. | Brian Duff | 2015-04-28 | 2 | -33/+11 |
| | | | | | | | | | | It turns out dex (apparently) was inlining these protected final methods from ExtendableMessageNano into every message class. Removing these methods from the base class and inlining their code reduces the method count by 2 methods / message when the store_unknown_fields option is on. Change-Id: I0aa09f2016d39939c4c8b8219601793b8fab301f | ||||
* | Generate @IntDef annotations for nanoproto enums. | Jeff Davidson | 2015-04-28 | 1 | -0/+23 |
| | | | | | | | | | | @IntDef is a support library annotation which allows build tools to determine the valid set of values for a given integer field when that field is intended to be restricted like an enum. This avoids the overhead of enums while still allowing for compile-time type checking in most circumstances. Change-Id: Iee02e0b49a8e069f6456572f538e0a0d301fdfd5 | ||||
* | Add reset() and position() to CodedOutputByteBufferNano. | Shai Barack | 2015-04-28 | 1 | -0/+17 |
| | | | | Change-Id: Ie2a9e36276ac35e10b3f8d379b5742d50a0374e9 | ||||
* | DO NOT MERGE Overloading createMessageTyped to accept a tag as an integer. | Kweku Adams | 2015-04-28 | 2 | -13/+13 |
| | | | | | | | | | | | When building, some instances expect createMessageTyped to have the signature (int, Class, long), while others expect (int, Class, int). Simply having the former signature meant that builds expecting the latter would fail. This is a cherrypick of change b2a9d4321578139677c146ce37eba5e27e8f5c79 from master. Change-Id: Ib02dbf66173510f4edea32c7b43e82c1a7a38aa2 | ||||
* | Exclude cachedSize when printing fields. | Brian Duff | 2015-04-28 | 1 | -0/+4 |
| | | | | Change-Id: I85563b74237d38c1e447b7286f5f6e62d57e3d63 | ||||
* | Add clone() method support for nano. | Brian Duff | 2015-04-28 | 9 | -5/+118 |
| | | | | | | Upstreamed from Another Place (cr/57247854). Change-Id: I2aaf59544c0f5ae21a51891d8a5eeda1dc722c90 | ||||
* | When no clear() is generated, still initialize fields. | Brian Duff | 2015-04-28 | 2 | -0/+15 |
| | | | | | | | | | | | | | | | | 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 | ||||
* | Fix comments. | Brian Duff | 2015-04-28 | 1 | -2/+2 |
| | | | | | | Forgot to update these in https://android-review.googlesource.com/#/c/109809/ Change-Id: I53f838e2f134f53964161d9620d5ead00c4a3939 | ||||
* | Optimize measurement and serialization of nano protos. | Charles Munger | 2015-04-28 | 2 | -23/+251 |
| | | | | | | | Measuring the serialized size of nano protos is now a zero-alloc operation, and serializing a proto now allocates no memory (other than the output buffer) instead of O(total length of strings). Change-Id: Id5e2ac3bdc4ac56c0bf13d725472da3a00c9baec Signed-off-by: Charles Munger <clm@google.com> | ||||
* | Fix bug with large extension field numbers. | Brian Duff | 2015-04-28 | 3 | -8/+30 |
| | | | | | | | | | | | | | | | | | | | Previously, extensions with field numbers greater than 268435455 would result in a compile time error in generated code that looks something like this: Foo.java:3178: error: integer number too large: 3346754610 3346754610); This is because we were trying to represent the tag number (an unsigned int) using a java int constant, but java int constants are signed, and can't exceed Integer.MAX_VALUE. Fixed by declaring it as a long instead, and casting it down to an int in the implementation. This is safe, because the tag value always fits in 32 bis. Change-Id: If2017bacb4e20af667eaeaf9b65ddc2c30a7709f | ||||
* | Clean up imports | Tamir Duberstein | 2015-04-02 | 2 | -3/+1 |
| | |||||
* | DRY: Use `Charset` statics to eliminate exceptions | Tamir Duberstein | 2015-04-02 | 4 | -43/+24 |
| | |||||
* | converted javanano README to markdown. Corrected Makefile | jesse | 2015-03-17 | 1 | -22/+41 |
| | |||||
* | Merge pull request #231 from google/alpha-2-fix | Chris Fallin | 2015-03-05 | 1 | -0/+60 |
|\ | | | | | Add maven release profile for JavaNano. | ||||
| * | Add maven release profile for JavaNano. | Jisi Liu | 2015-03-05 | 1 | -0/+60 |
| | | | | | | | | Change-Id: I885b561c85325db05595f0d86338dcd7c06cf058 | ||||
* | | Bump the version number to 3.0.0-alpha-3-pre | Jisi Liu | 2015-03-02 | 1 | -2/+2 |
|/ | | | | Change-Id: I33479e529b060e4fed532a827a386d3baecc835e | ||||
* | Update version number to 3.0.0-alpha-2 | Jisi Liu | 2015-02-21 | 1 | -2/+2 |
| | | | | Change-Id: Icecb25db34ae5e6d5142a2d75ca7216ba018abb2 | ||||
* | Add changelog for 3.0.0-alpha2 release. | Jisi Liu | 2015-02-20 | 1 | -10/+12 |
| | | | | Change-Id: I4cbb3374e351c31611de472c7d5d78e4ce2b0f3b | ||||
* | Add test for debug string for oneof | Jisi Liu | 2015-02-19 | 1 | -0/+2 |
| | | | | Change-Id: I6a51a35c69ac24a60dd96ef69d556b1e68bc37d6 | ||||
* | Fix review comments. | Jisi Liu | 2015-02-19 | 1 | -1/+1 |
| | | | | Change-Id: Iafd4a3aa9d55e31478bf070311eeadfe95ece4d7 | ||||
* | Add tests for oneofs. | Jisi Liu | 2015-02-19 | 1 | -6/+142 |
| | |||||
* | partial oneof tests. | Jisi Liu | 2015-02-19 | 1 | -0/+38 |
| | |||||
* | Add tests for oneof equals and hash. | Jisi Liu | 2015-02-19 | 2 | -0/+81 |
| | |||||
* | Uncomment string/bytes fields in oneof nano. | Jisi Liu | 2015-02-19 | 1 | -2/+2 |
| | |||||
* | Oneof message level elements (consts, case getter/clear) and messsage type ↵ | Jisi Liu | 2015-02-19 | 1 | -1/+1 |
| | | | | field oneof support. | ||||
* | Initial check in for primitive oneof fields. | Jisi Liu | 2015-02-19 | 1 | -0/+8 |
| | |||||
* | Support maps in NanoPrinter. | Jisi Liu | 2015-02-19 | 2 | -0/+53 |
| | |||||
* | Use EMPTY_BYTES in WireFormatNano | Jisi Liu | 2015-02-19 | 1 | -2/+1 |
| | |||||
* | Mark factory setter API as private for alpha release. | Jisi Liu | 2015-02-17 | 1 | -1/+5 |
| | |||||
* | Merge the javanano map test into the main test target. | Jisi Liu | 2015-02-09 | 1 | -4/+0 |
| | |||||
* | Get the map factory per mergeFrom() call for JavaNano. | Jisi Liu | 2015-02-07 | 1 | -1/+4 |
| | |||||
* | implement hashCode() for JavaNano maps. | Jisi Liu | 2015-02-06 | 1 | -0/+19 |
| | |||||
* | Implement Equals for nano. | Jisi Liu | 2015-02-06 | 2 | -2/+161 |
| | |||||
* | Rename empty bytes in JavaNano. | Jisi Liu | 2015-02-05 | 2 | -4/+3 |
| | |||||
* | Rename readData() to readPrimitiveField() in JavaNano. | Jisi Liu | 2015-02-05 | 3 | -4/+4 |
| | |||||
* | Add tests merging empty entries in JavaNano map | Jisi Liu | 2015-02-05 | 1 | -0/+30 |
| | |||||
* | Fix the behavior when merging conflicting keys, the new value always | Jisi Liu | 2015-02-05 | 3 | -34/+35 |
| | | | | override the existing one even for message types. | ||||
* | Test keys and values cannot be null. | Jisi Liu | 2015-02-05 | 1 | -1/+23 |
| | |||||
* | Basic serialization/parsing test. | Jisi Liu | 2015-02-05 | 2 | -1/+130 |
| | |||||
* | Moving internal code to InternalNano and rename MapUtil to MapFactories. | Jisi Liu | 2015-02-04 | 3 | -234/+230 |
| | |||||
* | parsing and serialzation for maps in JavaNano. | Jisi Liu | 2015-02-03 | 3 | -50/+296 |
| | |||||
* | Parsing for Maps in JavaNano | Jisi Liu | 2015-02-02 | 1 | -0/+97 |
| | |||||
* | Add readData(int) to read primitive value. | Jisi Liu | 2015-02-02 | 1 | -0/+40 |
| | |||||
* | MOVE TYPE_XXX constants to InternalNano. | Jisi Liu | 2015-02-02 | 2 | -54/+39 |
| | |||||
* | Add package for map test for nano. | Jisi Liu | 2015-02-02 | 2 | -1/+8 |
| | |||||
* | Add tests for JavaNano maps. | Jisi Liu | 2015-02-02 | 2 | -0/+53 |
| | |||||
* | Replace links in nano proto code. | Feng Xiao | 2014-11-26 | 27 | -27/+27 |
| | |||||
* | Fix the broken link at the bottom of javanano/README.txt | Feng Xiao | 2014-11-20 | 1 | -1/+1 |
| | |||||
* | Prepare nano proto code to be merged into protobuf repository. | Feng Xiao | 2014-11-19 | 35 | -0/+9522 |