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

Code generated for maps is not compiling

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.6.1
    • 0.7
    • JavaME - Compiler
    • None
    • Patch Available

    Description

      The following field defined in the contract of a structure:
      1:optional map<string,Foo> bar,

      will produce the following line in the related class's write(TProtocol oprot) method :
      (Foo)this.bar.get(_iter42).write(oprot);

      The cast needs some additional parentheses:
      ((Foo)this.bar.get(_iter42)).write(oprot);

      Attachments

        1. Patch.patch
          0.6 kB
          Raphaël B.

        Activity

          People

            rbartement Raphaël B.
            rbartement Raphaël B.
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: