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/12/16 06:56:44 UTC

[jira] Commented: (THRIFT-222) Should have a reflection feature to know if the field corresponding to a field id is set

    [ https://issues.apache.org/jira/browse/THRIFT-222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656893#action_12656893 ] 

Bryan Duxbury commented on THRIFT-222:
--------------------------------------

The patch looks pretty good. Here's a few thoughts I had:
 * A simple test to verify it works would be pretty nice.
 * There's some commented code on the end of line 55 in the patch that doesn't seem intentional.
 * Stick some javadoc that says what isSet does in the generated code.
 * It might be nice to make this into a separate method, as it appears throughout the code now:
{{{
+    if (nocamel_style_) {
+      cap_name = "_" + cap_name;
+    } else {
+      cap_name[0] = toupper(cap_name[0]);
+    }
}}}

> Should have a reflection feature to know if the field corresponding to a field id is set
> ----------------------------------------------------------------------------------------
>
>                 Key: THRIFT-222
>                 URL: https://issues.apache.org/jira/browse/THRIFT-222
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Java)
>            Reporter: Nathan Marz
>            Assignee: Piotr Kozikowski
>         Attachments: thrift-222.patch
>
>
> The closest thing to this now is "getFieldValue(int field)", but this only provides the desired behavior for nullable fields since it delegates to the getters for each field.

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