You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jens Geyer (JIRA)" <ji...@apache.org> on 2013/06/25 21:05:20 UTC
[jira] [Updated] (THRIFT-2065) Not valid constants filename in Java
[ https://issues.apache.org/jira/browse/THRIFT-2065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jens Geyer updated THRIFT-2065:
-------------------------------
Summary: Not valid constants filename in Java (was: Not valid contants filename in Java )
> Not valid constants 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.8, 0.9
> Reporter: Horacio Gonzalez
> Labels: java
>
> 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