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

boolean false value cannot be transferred

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.3
    • Fix Version/s: 0.10.0
    • Component/s: Lua - Compiler
    • Labels:
      None
    • Environment:

      Linux Windows

    • Patch Info:
      Patch Available
    • Flags:
      Patch, Important

      Description

      To check element of self whether nil or not,avoid the value(false) of BOOL is lost.

      eg.

      Before
        if self.argBool then
          oprot:writeFieldBegin('argBool', TType.BOOL, 13)
          oprot:writeBool(self.argBool)
          oprot:writeFieldEnd()
        end
      
      After
        if self.argBool ~= nil then
          oprot:writeFieldBegin('argBool', TType.BOOL, 13)
          oprot:writeBool(self.argBool)
          oprot:writeFieldEnd()
        end
      

      Why:
      the value(false) for parameter self.argBool will be lost when condition is 'if self.argBool then' as before.

        Attachments

          Activity

            People

            • Assignee:
              gityf WangYaofu
              Reporter:
              gityf WangYaofu
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: