You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Bryan Duxbury (JIRA)" <ji...@apache.org> on 2009/02/03 01:23:59 UTC

[jira] Created: (THRIFT-303) Changes to __isset interface

Changes to __isset interface
----------------------------

                 Key: THRIFT-303
                 URL: https://issues.apache.org/jira/browse/THRIFT-303
             Project: Thrift
          Issue Type: Improvement
          Components: Compiler (Java), Library (Java)
            Reporter: Bryan Duxbury
            Priority: Minor


I think that it would make a lot of sense for us to redefine the __isset interface of Java generated structs. With the changes in THRIFT-297, all TBase objects will now have the isSet generic method as well as isMyFieldSet per-field isset checkers. This gives the same kind of information as direct access to __isset as the public field does, but has the added advantage of hiding the information behind a method-based interface, freeing us to do things like THRIFT-115 and THRIFT-116 without breaking future clients. 

Especially with the future proposition of making a release, now would be a great time to improve this interface.

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


[jira] Commented: (THRIFT-303) Changes to __isset interface

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

Bryan Duxbury commented on THRIFT-303:
--------------------------------------

That's right. That's exactly what I want to do. 

> Changes to __isset interface
> ----------------------------
>
>                 Key: THRIFT-303
>                 URL: https://issues.apache.org/jira/browse/THRIFT-303
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Java), Library (Java)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>            Priority: Minor
>
> I think that it would make a lot of sense for us to redefine the __isset interface of Java generated structs. With the changes in THRIFT-297, all TBase objects will now have the isSet generic method as well as isMyFieldSet per-field isset checkers. This gives the same kind of information as direct access to __isset as the public field does, but has the added advantage of hiding the information behind a method-based interface, freeing us to do things like THRIFT-115 and THRIFT-116 without breaking future clients. 
> Especially with the future proposition of making a release, now would be a great time to improve this interface.

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


[jira] Updated: (THRIFT-303) Changes to __isset interface

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

Bryan Duxbury updated THRIFT-303:
---------------------------------

    Attachment: thrift-303.patch

Ok. This patch makes __isset always private and adds a method per field to set the __isset state when not using the bean-style generator. All the tests work, still, after some updating.

> Changes to __isset interface
> ----------------------------
>
>                 Key: THRIFT-303
>                 URL: https://issues.apache.org/jira/browse/THRIFT-303
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Java), Library (Java)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: thrift-303.patch
>
>
> I think that it would make a lot of sense for us to redefine the __isset interface of Java generated structs. With the changes in THRIFT-297, all TBase objects will now have the isSet generic method as well as isMyFieldSet per-field isset checkers. This gives the same kind of information as direct access to __isset as the public field does, but has the added advantage of hiding the information behind a method-based interface, freeing us to do things like THRIFT-115 and THRIFT-116 without breaking future clients. 
> Especially with the future proposition of making a release, now would be a great time to improve this interface.

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


[jira] Commented: (THRIFT-303) Changes to __isset interface

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

David Reiss commented on THRIFT-303:
------------------------------------

Theoretically, it is necessary for optional fields to be omitted, but we can skip it until someone needs it.  Won't you need to implement this anyway as part of the setters?  Is it really hard to have it be a separate method?  We can leave it private and if someone needs to use it in non-beans, make it public in non-beans.

> Changes to __isset interface
> ----------------------------
>
>                 Key: THRIFT-303
>                 URL: https://issues.apache.org/jira/browse/THRIFT-303
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Java), Library (Java)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>            Priority: Minor
>             Fix For: 0.1
>
>
> I think that it would make a lot of sense for us to redefine the __isset interface of Java generated structs. With the changes in THRIFT-297, all TBase objects will now have the isSet generic method as well as isMyFieldSet per-field isset checkers. This gives the same kind of information as direct access to __isset as the public field does, but has the added advantage of hiding the information behind a method-based interface, freeing us to do things like THRIFT-115 and THRIFT-116 without breaking future clients. 
> Especially with the future proposition of making a release, now would be a great time to improve this interface.

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


[jira] Assigned: (THRIFT-303) Changes to __isset interface

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

Bryan Duxbury reassigned THRIFT-303:
------------------------------------

    Assignee: Bryan Duxbury  (was: Luke Lu)

> Changes to __isset interface
> ----------------------------
>
>                 Key: THRIFT-303
>                 URL: https://issues.apache.org/jira/browse/THRIFT-303
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Java), Library (Java)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>            Priority: Minor
>
> I think that it would make a lot of sense for us to redefine the __isset interface of Java generated structs. With the changes in THRIFT-297, all TBase objects will now have the isSet generic method as well as isMyFieldSet per-field isset checkers. This gives the same kind of information as direct access to __isset as the public field does, but has the added advantage of hiding the information behind a method-based interface, freeing us to do things like THRIFT-115 and THRIFT-116 without breaking future clients. 
> Especially with the future proposition of making a release, now would be a great time to improve this interface.

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


[jira] Updated: (THRIFT-303) Changes to __isset interface

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

Bryan Duxbury updated THRIFT-303:
---------------------------------

    Fix Version/s: 0.1

> Changes to __isset interface
> ----------------------------
>
>                 Key: THRIFT-303
>                 URL: https://issues.apache.org/jira/browse/THRIFT-303
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Java), Library (Java)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>            Priority: Minor
>             Fix For: 0.1
>
>
> I think that it would make a lot of sense for us to redefine the __isset interface of Java generated structs. With the changes in THRIFT-297, all TBase objects will now have the isSet generic method as well as isMyFieldSet per-field isset checkers. This gives the same kind of information as direct access to __isset as the public field does, but has the added advantage of hiding the information behind a method-based interface, freeing us to do things like THRIFT-115 and THRIFT-116 without breaking future clients. 
> Especially with the future proposition of making a release, now would be a great time to improve this interface.

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


[jira] Resolved: (THRIFT-303) Changes to __isset interface

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

Bryan Duxbury resolved THRIFT-303.
----------------------------------

    Resolution: Fixed

I just committed this.

> Changes to __isset interface
> ----------------------------
>
>                 Key: THRIFT-303
>                 URL: https://issues.apache.org/jira/browse/THRIFT-303
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Java), Library (Java)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: thrift-303.patch
>
>
> I think that it would make a lot of sense for us to redefine the __isset interface of Java generated structs. With the changes in THRIFT-297, all TBase objects will now have the isSet generic method as well as isMyFieldSet per-field isset checkers. This gives the same kind of information as direct access to __isset as the public field does, but has the added advantage of hiding the information behind a method-based interface, freeing us to do things like THRIFT-115 and THRIFT-116 without breaking future clients. 
> Especially with the future proposition of making a release, now would be a great time to improve this interface.

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


[jira] Commented: (THRIFT-303) Changes to __isset interface

Posted by "Nathan Marz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669810#action_12669810 ] 

Nathan Marz commented on THRIFT-303:
------------------------------------

This is a great idea.

> Changes to __isset interface
> ----------------------------
>
>                 Key: THRIFT-303
>                 URL: https://issues.apache.org/jira/browse/THRIFT-303
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Java), Library (Java)
>            Reporter: Bryan Duxbury
>            Priority: Minor
>
> I think that it would make a lot of sense for us to redefine the __isset interface of Java generated structs. With the changes in THRIFT-297, all TBase objects will now have the isSet generic method as well as isMyFieldSet per-field isset checkers. This gives the same kind of information as direct access to __isset as the public field does, but has the added advantage of hiding the information behind a method-based interface, freeing us to do things like THRIFT-115 and THRIFT-116 without breaking future clients. 
> Especially with the future proposition of making a release, now would be a great time to improve this interface.

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


[jira] Assigned: (THRIFT-303) Changes to __isset interface

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

Bryan Duxbury reassigned THRIFT-303:
------------------------------------

    Assignee: Luke Lu

> Changes to __isset interface
> ----------------------------
>
>                 Key: THRIFT-303
>                 URL: https://issues.apache.org/jira/browse/THRIFT-303
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Java), Library (Java)
>            Reporter: Bryan Duxbury
>            Assignee: Luke Lu
>            Priority: Minor
>
> I think that it would make a lot of sense for us to redefine the __isset interface of Java generated structs. With the changes in THRIFT-297, all TBase objects will now have the isSet generic method as well as isMyFieldSet per-field isset checkers. This gives the same kind of information as direct access to __isset as the public field does, but has the added advantage of hiding the information behind a method-based interface, freeing us to do things like THRIFT-115 and THRIFT-116 without breaking future clients. 
> Especially with the future proposition of making a release, now would be a great time to improve this interface.

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


[jira] Updated: (THRIFT-303) Changes to __isset interface

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

Bryan Duxbury updated THRIFT-303:
---------------------------------

    Patch Info: [Patch Available]

> Changes to __isset interface
> ----------------------------
>
>                 Key: THRIFT-303
>                 URL: https://issues.apache.org/jira/browse/THRIFT-303
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Java), Library (Java)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: thrift-303.patch
>
>
> I think that it would make a lot of sense for us to redefine the __isset interface of Java generated structs. With the changes in THRIFT-297, all TBase objects will now have the isSet generic method as well as isMyFieldSet per-field isset checkers. This gives the same kind of information as direct access to __isset as the public field does, but has the added advantage of hiding the information behind a method-based interface, freeing us to do things like THRIFT-115 and THRIFT-116 without breaking future clients. 
> Especially with the future proposition of making a release, now would be a great time to improve this interface.

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


[jira] Commented: (THRIFT-303) Changes to __isset interface

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

David Reiss commented on THRIFT-303:
------------------------------------

LG.

> Changes to __isset interface
> ----------------------------
>
>                 Key: THRIFT-303
>                 URL: https://issues.apache.org/jira/browse/THRIFT-303
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Java), Library (Java)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: thrift-303.patch
>
>
> I think that it would make a lot of sense for us to redefine the __isset interface of Java generated structs. With the changes in THRIFT-297, all TBase objects will now have the isSet generic method as well as isMyFieldSet per-field isset checkers. This gives the same kind of information as direct access to __isset as the public field does, but has the added advantage of hiding the information behind a method-based interface, freeing us to do things like THRIFT-115 and THRIFT-116 without breaking future clients. 
> Especially with the future proposition of making a release, now would be a great time to improve this interface.

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


[jira] Commented: (THRIFT-303) Changes to __isset interface

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

Bryan Duxbury commented on THRIFT-303:
--------------------------------------

Do users of the standard java generator need the ability to set the __isset value for a field? The original intent of __isset was to say whether the value was present when read off the wire, but it also is the only way to avoid serializing "unset" primitive fields when using the standard generator. I can generate "setMyFieldIsSet(bool)" methods for each field, but I'd like to avoid it if possible.  

> Changes to __isset interface
> ----------------------------
>
>                 Key: THRIFT-303
>                 URL: https://issues.apache.org/jira/browse/THRIFT-303
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Java), Library (Java)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>            Priority: Minor
>             Fix For: 0.1
>
>
> I think that it would make a lot of sense for us to redefine the __isset interface of Java generated structs. With the changes in THRIFT-297, all TBase objects will now have the isSet generic method as well as isMyFieldSet per-field isset checkers. This gives the same kind of information as direct access to __isset as the public field does, but has the added advantage of hiding the information behind a method-based interface, freeing us to do things like THRIFT-115 and THRIFT-116 without breaking future clients. 
> Especially with the future proposition of making a release, now would be a great time to improve this interface.

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


[jira] Commented: (THRIFT-303) Changes to __isset interface

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

David Reiss commented on THRIFT-303:
------------------------------------

So what is the proposition?  Make __isset private than fool around with the implementation under the scope of more specific issues?  If so, +1.

> Changes to __isset interface
> ----------------------------
>
>                 Key: THRIFT-303
>                 URL: https://issues.apache.org/jira/browse/THRIFT-303
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Java), Library (Java)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>            Priority: Minor
>
> I think that it would make a lot of sense for us to redefine the __isset interface of Java generated structs. With the changes in THRIFT-297, all TBase objects will now have the isSet generic method as well as isMyFieldSet per-field isset checkers. This gives the same kind of information as direct access to __isset as the public field does, but has the added advantage of hiding the information behind a method-based interface, freeing us to do things like THRIFT-115 and THRIFT-116 without breaking future clients. 
> Especially with the future proposition of making a release, now would be a great time to improve this interface.

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