You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Enis Soztutar (JIRA)" <ji...@apache.org> on 2010/01/14 12:09:54 UTC

[jira] Created: (THRIFT-677) IntRangeSet.java ignores first element in the constructor array

IntRangeSet.java ignores first element in the constructor array
---------------------------------------------------------------

                 Key: THRIFT-677
                 URL: https://issues.apache.org/jira/browse/THRIFT-677
             Project: Thrift
          Issue Type: Bug
          Components: Library (Java)
            Reporter: Enis Soztutar


Although IntRangeSet is no more used since generation of enums using native java enums, the class is still used by legacy code. 
The constructor for IntRangeSet does not put the first element in the given array to the realSet, which results in incorrect behavior. 

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


[jira] Commented: (THRIFT-677) IntRangeSet.java ignores first element in the constructor array

Posted by "Enis Soztutar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12800632#action_12800632 ] 

Enis Soztutar commented on THRIFT-677:
--------------------------------------

bq. When you say that the class is "still used by legacy code", is there some reason this legacy code can't be regenerated?
For our use cases, we have not updated thrift for a while. There may be others like this. 
bq. In all honesty, I'd forgotten that this class was even still in the codebase, and I think the correct thing for us to do is to remove it. 
Agreed that if this class will no longer be used it is better to remove it instead of applying this patch. 


> IntRangeSet.java ignores first element in the constructor array
> ---------------------------------------------------------------
>
>                 Key: THRIFT-677
>                 URL: https://issues.apache.org/jira/browse/THRIFT-677
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Java)
>            Reporter: Enis Soztutar
>         Attachments: intrangeset_v1.patch
>
>
> Although IntRangeSet is no more used since generation of enums using native java enums, the class is still used by legacy code. 
> The constructor for IntRangeSet does not put the first element in the given array to the realSet, which results in incorrect behavior. 

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


[jira] Commented: (THRIFT-677) IntRangeSet.java ignores first element in the constructor array

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12800263#action_12800263 ] 

David Reiss commented on THRIFT-677:
------------------------------------

There is not a good reason for this.

> IntRangeSet.java ignores first element in the constructor array
> ---------------------------------------------------------------
>
>                 Key: THRIFT-677
>                 URL: https://issues.apache.org/jira/browse/THRIFT-677
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Java)
>            Reporter: Enis Soztutar
>         Attachments: intrangeset_v1.patch
>
>
> Although IntRangeSet is no more used since generation of enums using native java enums, the class is still used by legacy code. 
> The constructor for IntRangeSet does not put the first element in the given array to the realSet, which results in incorrect behavior. 

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


[jira] Updated: (THRIFT-677) IntRangeSet.java ignores first element in the constructor array

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

Enis Soztutar updated THRIFT-677:
---------------------------------

    Attachment: intrangeset_v1.patch

I am attaching a patch, complete with a unit test. The patch also enables empty intrangesets. 

BTW, why thrift does not use a well established unit testing framework? 

> IntRangeSet.java ignores first element in the constructor array
> ---------------------------------------------------------------
>
>                 Key: THRIFT-677
>                 URL: https://issues.apache.org/jira/browse/THRIFT-677
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Java)
>            Reporter: Enis Soztutar
>         Attachments: intrangeset_v1.patch
>
>
> Although IntRangeSet is no more used since generation of enums using native java enums, the class is still used by legacy code. 
> The constructor for IntRangeSet does not put the first element in the given array to the realSet, which results in incorrect behavior. 

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


[jira] Resolved: (THRIFT-677) IntRangeSet.java ignores first element in the constructor array

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

Bryan Duxbury resolved THRIFT-677.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 0.3
         Assignee: Bryan Duxbury

I have removed IntRangeSet from the codebase. Thanks for bringing this to my attention, Enis!

> IntRangeSet.java ignores first element in the constructor array
> ---------------------------------------------------------------
>
>                 Key: THRIFT-677
>                 URL: https://issues.apache.org/jira/browse/THRIFT-677
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Java)
>            Reporter: Enis Soztutar
>            Assignee: Bryan Duxbury
>             Fix For: 0.3
>
>         Attachments: intrangeset_v1.patch
>
>
> Although IntRangeSet is no more used since generation of enums using native java enums, the class is still used by legacy code. 
> The constructor for IntRangeSet does not put the first element in the given array to the realSet, which results in incorrect behavior. 

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


[jira] Commented: (THRIFT-677) IntRangeSet.java ignores first element in the constructor array

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12800281#action_12800281 ] 

Bryan Duxbury commented on THRIFT-677:
--------------------------------------

When you say that the class is "still used by legacy code", is there some reason this legacy code can't be regenerated? In all honesty, I'd forgotten that this class was even still in the codebase, and I think the correct thing for us to do is to remove it.

We don't use a unit testing framework just because no one has taken the time to convert our existing suite. I'd love to tackle that at some point, but haven't had the time.

> IntRangeSet.java ignores first element in the constructor array
> ---------------------------------------------------------------
>
>                 Key: THRIFT-677
>                 URL: https://issues.apache.org/jira/browse/THRIFT-677
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (Java)
>            Reporter: Enis Soztutar
>         Attachments: intrangeset_v1.patch
>
>
> Although IntRangeSet is no more used since generation of enums using native java enums, the class is still used by legacy code. 
> The constructor for IntRangeSet does not put the first element in the given array to the realSet, which results in incorrect behavior. 

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