Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
if (!first) sb.append(", "); sb.append("i16_list:"); if (this.i16_list == null) { sb.append("null"); } else { sb.append(this.i16_list); }
The overall effect is exactly as if the argument were converted to a string by the method String.valueOf(Object), and the characters of that string were then appended to this character sequence.
if the argument is null, then a string equal to "null"; otherwise, the value of obj.toString() is returned.
So, Thrift doesn't need to manually append 'null' here, can reduce the code here.
Attachments
Issue Links
- links to