You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Tom Lee (JIRA)" <ji...@apache.org> on 2014/05/28 09:02:02 UTC

[jira] [Commented] (THRIFT-2469) "java:fullcamel" option to automatically camel-case underscored attribute names

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

Tom Lee commented on THRIFT-2469:
---------------------------------

Does this patch look okay? I'm not a regular contributor, curious to know whether this has a chance of landing. :)

> "java:fullcamel" option to automatically camel-case underscored attribute names
> -------------------------------------------------------------------------------
>
>                 Key: THRIFT-2469
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2469
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Java - Compiler
>            Reporter: Tom Lee
>            Priority: Minor
>             Fix For: 0.9.2
>
>         Attachments: thrift-2469-fullcamel-option-v1.patch
>
>
> Currently the code generator will generate a getter method called "getFoo_bar" for a Thrift attribute called "foo_bar". This is unfortunate since it's considered "bad style" in Java, but is often unavoidable if you need to share a Thrift IDL with clients of another language (e.g. Ruby, where underscores are the norm).
> The attached patch adds support for a "fullcamel" option that does something resembling the opposite of "nocamel" by uppercasing both the first character in the name as well as any characters that follow an underscore in t_java_generator::get_cap_name. The underscores themselves are completely omitted.



--
This message was sent by Atlassian JIRA
(v6.2#6252)