git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@817317
13f79535-47bb-0310-9956-
ffa450edef68
indent(out) << "@Override" << endl;
indent(out) << "public int compareTo(" << type_name(tstruct) << " other) {" << endl;
indent(out) << " int lastComparison = TBaseHelper.compareTo(getSetField(), other.getSetField());" << endl;
- indent(out) << " if (lastComparison != 0) {" << endl;
+ indent(out) << " if (lastComparison == 0) {" << endl;
indent(out) << " return TBaseHelper.compareTo((Comparable)getFieldValue(), (Comparable)other.getFieldValue());" << endl;
indent(out) << " }" << endl;
indent(out) << " return lastComparison;" << endl;