[ https://issues.apache.org/jira/browse/THRIFT-3089?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jens Geyer resolved THRIFT-3089. -------------------------------- Resolution: Pending Closed Fix Version/s: 0.9.3 Assignee: Anna Dymek (was: Jens Geyer) Committed, many thanks. > 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)