You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Sylwester Lachiewicz (Jira)" <ji...@apache.org> on 2022/05/18 19:53: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=17539045#comment-17539045 ] 

Sylwester Lachiewicz commented on THRIFT-5014:
----------------------------------------------

merged to v0.14.0 with https://github.com/apache/thrift/commit/44d8cc6b435557ef5ba9e4c9df91b2f114a5bfa0

> 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.7#820007)