You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Roger Meier (JIRA)" <ji...@apache.org> on 2014/05/30 00:56:01 UTC

[jira] [Resolved] (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:all-tabpanel ]

Roger Meier resolved THRIFT-2469.
---------------------------------

    Resolution: Fixed
      Assignee: Roger Meier

committed

Java guys will love this option ;-r

> "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
>            Assignee: Roger Meier
>            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)