thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Mollitor (Jira)" <j...@apache.org>
Subject [jira] [Created] (THRIFT-5014) Do Direct Comparison on Raw Values Instead of Objects
Date Mon, 18 Nov 2019 01:56:00 GMT
David Mollitor created THRIFT-5014:
--------------------------------------

             Summary: Do Direct Comparison on Raw Values Instead of Objects
                 Key: THRIFT-5014
                 URL: https://issues.apache.org/jira/browse/THRIFT-5014
             Project: Thrift
          Issue Type: Improvement
          Components: Java - Compiler
    Affects Versions: 0.13.0
            Reporter: David Mollitor
            Assignee: David Mollitor


Java compiler currently generates:

{code:java}
    lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
    if (lastComparison != 0) {
      return lastComparison;
    }
{code}

Instead, use {{Boolean#compare}} to compare the raw values instead of having to call {{Boolean.ValueOf}}
first.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message