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 2008/07/31 00:29:31 UTC

[jira] Created: (THRIFT-101) In java:beans, possible to get an unset primitive type

In java:beans, possible to get an unset primitive type
------------------------------------------------------

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


In code generated by the java:beans generator, if you have a primitive type, say an int, that was unset on the wire, it would be possible to get a "null" value. Perhaps in the case of primitive types, the getter should check isset, and if it's false, throw an exception or notify the user somehow. 

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


[jira] Commented: (THRIFT-101) In java:beans, possible to get an unset primitive type

Posted by "Hiram Chirino (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626279#action_12626279 ] 

Hiram Chirino commented on THRIFT-101:
--------------------------------------

or perhaps provide an isFooSet() type method

> In java:beans, possible to get an unset primitive type
> ------------------------------------------------------
>
>                 Key: THRIFT-101
>                 URL: https://issues.apache.org/jira/browse/THRIFT-101
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Java)
>            Reporter: Bryan Duxbury
>            Priority: Minor
>
> In code generated by the java:beans generator, if you have a primitive type, say an int, that was unset on the wire, it would be possible to get a "null" value. Perhaps in the case of primitive types, the getter should check isset, and if it's false, throw an exception or notify the user somehow. 

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


[jira] Resolved: (THRIFT-101) In java:beans, possible to get an unset primitive type

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

Bryan Duxbury resolved THRIFT-101.
----------------------------------

    Resolution: Invalid

We do have a way to get isset for primitive fields in beans style now, so I don't think this issue needs to stay open.

> In java:beans, possible to get an unset primitive type
> ------------------------------------------------------
>
>                 Key: THRIFT-101
>                 URL: https://issues.apache.org/jira/browse/THRIFT-101
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Java)
>            Reporter: Bryan Duxbury
>            Priority: Minor
>
> In code generated by the java:beans generator, if you have a primitive type, say an int, that was unset on the wire, it would be possible to get a "null" value. Perhaps in the case of primitive types, the getter should check isset, and if it's false, throw an exception or notify the user somehow. 

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