Horacio Gonzalez created THRIFT-2065: ----------------------------------------
Summary: Not valid contants filename in Java Key: THRIFT-2065 URL: https://issues.apache.org/jira/browse/THRIFT-2065 Project: Thrift Issue Type: Bug Components: Java - Compiler Affects Versions: 0.9, 0.8 Reporter: Horacio Gonzalez 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 '_') ? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira