You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Takashi Yonebayashi (JIRA)" <ji...@apache.org> on 2010/06/14 06:34:15 UTC

[jira] Created: (THRIFT-804) CompareTo is broken for unions set to map, set, or list

CompareTo is broken for unions set to map, set, or list
-------------------------------------------------------

                 Key: THRIFT-804
                 URL: https://issues.apache.org/jira/browse/THRIFT-804
             Project: Thrift
          Issue Type: Bug
          Components: Compiler (Java)
            Reporter: Takashi Yonebayashi
            Priority: Minor


When comparing unions set to map, set, or list, it attempts to cast them to Comparable, resulting in a class cast exception.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (THRIFT-804) CompareTo is broken for unions set to map, set, or list

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-804?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Duxbury reassigned THRIFT-804:
------------------------------------

    Assignee: Bryan Duxbury

> CompareTo is broken for unions set to map, set, or list
> -------------------------------------------------------
>
>                 Key: THRIFT-804
>                 URL: https://issues.apache.org/jira/browse/THRIFT-804
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Java)
>            Reporter: Takashi Yonebayashi
>            Assignee: Bryan Duxbury
>            Priority: Minor
>         Attachments: thrift-804.patch
>
>
> When comparing unions set to map, set, or list, it attempts to cast them to Comparable, resulting in a class cast exception.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-804) CompareTo is broken for unions set to map, set, or list

Posted by "Takashi Yonebayashi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12881809#action_12881809 ] 

Takashi Yonebayashi commented on THRIFT-804:
--------------------------------------------

Yeah, that sounds a lot better.  

> CompareTo is broken for unions set to map, set, or list
> -------------------------------------------------------
>
>                 Key: THRIFT-804
>                 URL: https://issues.apache.org/jira/browse/THRIFT-804
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Java)
>            Reporter: Takashi Yonebayashi
>            Assignee: Bryan Duxbury
>            Priority: Minor
>         Attachments: thrift-804-v2.patch, thrift-804.patch
>
>
> When comparing unions set to map, set, or list, it attempts to cast them to Comparable, resulting in a class cast exception.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-804) CompareTo is broken for unions set to map, set, or list

Posted by "Takashi Yonebayashi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-804?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Takashi Yonebayashi updated THRIFT-804:
---------------------------------------

    Attachment: thrift-804.patch

> CompareTo is broken for unions set to map, set, or list
> -------------------------------------------------------
>
>                 Key: THRIFT-804
>                 URL: https://issues.apache.org/jira/browse/THRIFT-804
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Java)
>            Reporter: Takashi Yonebayashi
>            Priority: Minor
>         Attachments: thrift-804.patch
>
>
> When comparing unions set to map, set, or list, it attempts to cast them to Comparable, resulting in a class cast exception.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (THRIFT-804) CompareTo is broken for unions set to map, set, or list

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-804?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Duxbury closed THRIFT-804.
--------------------------------

    Fix Version/s: 0.4
       Resolution: Fixed

I just committed this. Thanks for supplying the original patch, Takashi.

> CompareTo is broken for unions set to map, set, or list
> -------------------------------------------------------
>
>                 Key: THRIFT-804
>                 URL: https://issues.apache.org/jira/browse/THRIFT-804
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Java)
>            Reporter: Takashi Yonebayashi
>            Assignee: Bryan Duxbury
>            Priority: Minor
>             Fix For: 0.4
>
>         Attachments: thrift-804-v2.patch, thrift-804.patch
>
>
> When comparing unions set to map, set, or list, it attempts to cast them to Comparable, resulting in a class cast exception.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-804) CompareTo is broken for unions set to map, set, or list

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-804?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Duxbury updated THRIFT-804:
---------------------------------

    Attachment: thrift-804-v2.patch

How about this? Rather than generate the same code over and over, I moved the Object comparison logic into TBaseHelper and just use that instead.

I kept your test modifications, and it still passes with these changes.

> CompareTo is broken for unions set to map, set, or list
> -------------------------------------------------------
>
>                 Key: THRIFT-804
>                 URL: https://issues.apache.org/jira/browse/THRIFT-804
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Java)
>            Reporter: Takashi Yonebayashi
>            Assignee: Bryan Duxbury
>            Priority: Minor
>         Attachments: thrift-804-v2.patch, thrift-804.patch
>
>
> When comparing unions set to map, set, or list, it attempts to cast them to Comparable, resulting in a class cast exception.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.