Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1866

java compiler generates non-compiling code with const's defined in a thrift file whose name includes non-identifier chars

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9
    • Fix Version/s: 0.9.3
    • Component/s: Java - Compiler
    • Labels:
      None
    • Environment:

      Mac OS X 10.7.5

      Description

      Thrift-0.9 Java compiler generates non-compiling code when both the following conditions happen:

      • thrift file name includes a character which is not a valid java identifier (i.e. '-')
      • thrift file includes 'const' fields

      Thrift generates the Java file named <thriftFileName>Constants.java which is not compiling because of the non-identifier in the thriftFileName.

      Earlier thrift versions are fine because they generate only Constants.java file without prefixing thrift file name to it.

      Please find attached an example thrift file.

        Attachments

        1. test-thrift.thrift
          0.0 kB
          Bekir Oguz

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                bekiroguz Bekir Oguz
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: