1. 19 Nov, 2014 1 commit
  2. 01 Oct, 2014 1 commit
  3. 14 Jul, 2014 1 commit
    • Juan Silveira's avatar
      Keep pointers to extension values. · 79f19eb9
      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
      79f19eb9
  4. 07 May, 2014 1 commit
  5. 25 Apr, 2014 1 commit
    • Jeff Davidson's avatar
      Support generation of Parcelable nano messages. · ec4b1ce0
      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
      ec4b1ce0
  6. 23 Apr, 2014 1 commit
    • Jie Dai's avatar
      Adds --ignore_service nano proto compiler flag · d9425a62
      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
      d9425a62
  7. 10 Apr, 2014 1 commit
  8. 22 Mar, 2014 2 commits
  9. 21 Mar, 2014 1 commit
    • Dave Hawkey's avatar
      Don't reset cachedSize to 0 in getSerializedSize · 5090f19e
      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).
      
      Change-Id: I15a8ded92edbf41bf1c8d787960c5bbbc8a323c5
      5090f19e
  10. 16 Jan, 2014 1 commit
    • Max Cai's avatar
      Add validation when parsing enum fields. · e005be65
      Max Cai authored
      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
      e005be65
  11. 14 Jan, 2014 1 commit
  12. 09 Dec, 2013 1 commit
    • Andrew Flynn's avatar
      Nano: don't generate accessor methods for nested methods · c997c136
      Andrew Flynn authored
      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
      c997c136
  13. 18 Nov, 2013 1 commit
    • Max Cai's avatar
      Align with main: two ways of parsing repeated packable fields. · adf2449a
      Max Cai authored
      It is a requirement for parsing code to handle packed and unpacked
      forms on the wire for repeated packable fields. This change aligns
      the javanano's behavior with the java's.
      
      Bonus: optimize array length calculation when parsing repeated
      fixed-size-element-type fields.
      
      Bonus 2: lose "xMemoizedSerializedSize" for repeated enum fields,
      and make the serialized size calculation match that for repeated
      int32 fields.
      
      Change-Id: I8a06103d9290234adb46b0971b5ed155544fe86a
      adf2449a
  14. 10 Oct, 2013 1 commit
  15. 07 Oct, 2013 1 commit
  16. 25 Sep, 2013 1 commit
    • Max Cai's avatar
      Implement enum_style=java option. · 1479c7ab
      Max Cai authored
      This javanano_out command line option creates a container interface
      at the normal place where the enum constants would reside, per enum
      definition. The java_multiple_files flag would now affect the file-
      scope enums with the shells. If the flag is true then file-scope
      container interfaces are created in their own files.
      
      Change-Id: Id52258fcff8d3dee9db8f3d8022147a811bf3565
      1479c7ab
  17. 23 Sep, 2013 1 commit
    • Max Cai's avatar
      Accessor style for optional fields. · b337f256
      Max Cai authored
      This CL implements the 'optional_field_style=accessors' option.
      All optional fields will now be 1 Java field and 1 bit in a shared
      bitfield behind get/set/has/clear accessor methods. The setter
      performs null check for reference types (Strings and byte[]s).
      
      Also decentralized the clear code generation.
      
      Change-Id: I60ac78329e352e76c2f8139fba1f292383080ad3
      b337f256
  18. 05 Aug, 2013 1 commit
    • Max Cai's avatar
      Fix outer classname for javamicro/javanano. · 06eed37e
      Max Cai authored
      - File class name is defined as the java_outer_classname option value
        or the file name ToCamelCase; never the single message's ClassName.
      - File-scope enums are translated to constants in the file class,
        regardless of java_multiple_files.
      - If java_multiple_files=true, and file's class name equals a message's
        class name, no error. This is done by detecting that the outer class
        is not needed and skipping the outer class codegen and clash checks.
        Note: there is a disparity between java[lite] and the previous
        java{micr|nan}o: when generating code for a single-message proto, the
        outer class is omitted by java{micr|nan}o if the file does not have
        java_outer_classname. This change makes java{micr|nan}o align with
        java[lite] codegen and create the outer class, but will print some
        info to warn of potential change of code.
      - Also fixed the "is_own_file" detection and made all parseX() methods
        static. Previously, all messages in a java_multiple_files=true file
        are (incorrectly) considered to be in their own files, including
        nested messages, causing them to become inner classes (instance-
        bound) and forcing the parseX() methods to lose the static modifier.
      - This change supersedes c/60164 and c/60086, which causes javanano to
        put enum values into enum shell classes if java_multiple_files=true.
        We now always use the parent class to host the enum values. A future
        change will add a command line option to provide more flexibility.
      - Elaborated in java/README.txt.
      
      Change-Id: I684932f90e0a028ef37c662b221def5ffa202439
      06eed37e
  19. 29 Jul, 2013 1 commit
  20. 25 Jul, 2013 1 commit
  21. 19 Jul, 2013 1 commit
  22. 26 Apr, 2013 1 commit
  23. 03 Apr, 2013 1 commit
    • Ulas Kirazci's avatar
      Nano protobufs. · d6592c75
      Ulas Kirazci authored
      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
      d6592c75
  24. 01 Apr, 2013 1 commit
    • Ulas Kirazci's avatar
      Nano protobufs. · 2337023f
      Ulas Kirazci authored
      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
      2337023f
  25. 06 Oct, 2010 1 commit
  26. 29 May, 2010 2 commits
  27. 28 May, 2010 1 commit
  28. 27 May, 2010 1 commit
  29. 05 Aug, 2009 1 commit
  30. 04 Aug, 2009 1 commit
  31. 21 Jul, 2008 1 commit
    • temporal's avatar
      misc. stuff: · cc930432
      temporal authored
      - Improved readmes.
      - Fixed incorrect definition of kint32min.
      - Fixed absolute output paths on Windows.
      - Added info to Java POM that will be required when we upload the
        package to a Maven repo.
      cc930432
  32. 10 Jul, 2008 1 commit