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

Forward slash in comment causes compiler error

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.10.0
    • Component/s: Compiler (General)
    • Labels:
      None

      Description

      This comment in a .thrift file will cause a parse error:

      /**
       * /
       */
      

      For example:

      $ thrift -version                 
      Thrift version 0.9.3
      $ cat example.thrift              
      namespace java com.example
      
      /**
       * /
       */
      struct Foo {}
      $ thrift --gen java example.thrift
      [ERROR:/Users/ryangreenberg/workspace/source/example.thrift:3] (last token was '/')
      Unexpected token in input: "/"
      

      This bug was encountered because of a reference to an absolute file path in a docblock comment (e.g. * /var/log/…)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jensg Jens Geyer
                Reporter:
                ryangreenberg Ryan Greenberg
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: