Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Pending Closed
-
0.9.2
-
None
Description
enumtest.thrift
enum Color {
BLACK = 5,
WHITE = 6
}
struct Params {
1: optional Color bColor = Color.BLACK;
}
Running thrift --gen java enumtest.thrift (thrift 0.9.2 on OSX 10.10.3)
results in non-compilable java code.
public Params() { this.bColor = .Color.BLACK; } @Override public void clear() { this.bColor = .Color.BLACK; }
Notice the "." before Color.BLACK. If java namespace is defined in the thrift file, it works as expected.
Attachments
Issue Links
- contains
-
THRIFT-2326 Enums generated for Java doesn't work for types in maps
- Closed