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

Hudson commented on THRIFT-3089:
--------------------------------

SUCCESS: Integrated in Thrift #1544 (See 
[https://builds.apache.org/job/Thrift/1544/])
THRIFT-3089 Assigning default ENUM values results in non-compilable java code 
if java namespace is not defined (jensg: rev 
eab9c45bad1d19e5b2a2c94695699fee5325bd82)
* compiler/cpp/src/generate/t_java_generator.cc


> Assigning default ENUM values results in non-compilable java code if java 
> namespace is not defined
> --------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-3089
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3089
>             Project: Thrift
>          Issue Type: Bug
>          Components: Java - Compiler
>    Affects Versions: 0.9.2
>            Reporter: Pavan Chitumalla
>            Assignee: Anna Dymek
>             Fix For: 0.9.3
>
>
> {code:title=enumtest.thrift}
> enum Color {
>   BLACK = 5,
>   WHITE = 6
> }
> struct Params {
>   1: optional Color bColor = Color.BLACK;
> }
> {code}
> Running thrift --gen java enumtest.thrift (thrift 0.9.2 on OSX 10.10.3)
> results in non-compilable java code.
> {code}
>   public Params() {
>     this.bColor = .Color.BLACK;
>   }
>   @Override
>   public void clear() {
>     this.bColor = .Color.BLACK;
>   }
> {code}
> Notice the "." before Color.BLACK. If java namespace is defined in the thrift 
> file, it works as expected.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to