Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.9.3
-
None
-
Linux Windows
-
Patch Available
-
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.