Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.8, 0.9
-
Patch Available
Description
In my company we use to name our thrift file separating data and services.
I.e. for two files, one for user management, another for address management, we would have four thrift files : user.data.thrift , user.services.thrift address.data.thrift and address.services.thrift
We were using thrift 0.2.0 and generating java code, and it worked perfectly. We try now to pass to thrift 0.9.0 and everything works besides constants.
For contants, in 0.2.0 it generated a Constants.java class in the package declared in the namespace java.
In 0.9.0, for a file FILENAME.thrift it generates a FILENAMEConstants.java in the package declared in the namespace java. And if the filename includes a dot, it generates a java file with a dot in the name, not valid in java.
So for my precedent example I get a user.dataConstants.java and address.dataConstants.java, with Java classes called user.dataConstants and address.dataConstant. And the Java compiler doesn't accept classes with a dot in the class name.
Would it be possible to find a solution (for example scanning for dots before generating the constants file and changing them for a '_') ?
Attachments
Attachments
Issue Links
- is blocked by
-
THRIFT-1090 Document the generation of a file called "Constants.java"
- Closed
- relates to
-
THRIFT-1383 Spaces in thrift input file lead to incorrectly generated code
- Open
-
THRIFT-1977 C# compiler should generate constant files prefixed with thrift file name
- Closed