Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-5105

Very minor issue: why are the values for "unlimited" different between Java and cpp?

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 0.13.0
    • None
    • C++ - Library
    • None

    Description

      I've seen that in Java, https://github.com/apache/thrift/blob/882d48da5d5db439c11029f46006c71f6429ae2c/lib/java/src/org/apache/thrift/protocol/TBinaryProtocol.java#L34 defines a constant NO_LENGTH_LIMIT = -1 to initialize string_limit and container_limit of TBinaryProtocol. In C++ on the other hand, the default values (I guess they represent unlimited) are set in https://github.com/apache/thrift/blob/042580f53441efe1bc5c80c89351fcb30740659e/lib/cpp/src/thrift/protocol/TBinaryProtocol.h#L47 with string_limit_(0).

       

      This is really no big issue but for consistency it may be nicer if all implementation use the same default for "unlimited"?

      Attachments

        Activity

          People

            Unassigned Unassigned
            emmenlau Mario Emmenlauer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: