You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Liu Jiayu (Jira)" <ji...@apache.org> on 2022/04/14 03:58:00 UTC

[jira] [Commented] (THRIFT-5014) Do Direct Comparison on Raw Values Instead of Objects

    [ https://issues.apache.org/jira/browse/THRIFT-5014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17522043#comment-17522043 ] 

Liu Jiayu commented on THRIFT-5014:
-----------------------------------

i think this issue can be closed given the pull request is merged

> 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
>            Priority: Minor
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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.20.1#820001)