Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-1814

Generated java code fails on variables with a TLD name like 'org'

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.8.0
    • None
    • java
    • None
    • Using a variable name that also happens to be a toplevel domain name (like 'org') no longer causes errors.

    Description

      The problem is in the generated 'readExternal' and 'writeExternal' functions, because they do something like:

      WRITER$.write(this, org.apache.avro.specific.SpecificData.getEncoder(out));

      When a member variable called 'org' exists, then the compile fails because the compiler thinks that 'org' is a member variable and that 'apache cannot be resolved or is not a field'.

      Attachments

        1. AVRO-1814-20160428.patch
          7 kB
          Niels Basjes
        2. AVRO-1814-20160410.patch
          7 kB
          Niels Basjes

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            nielsbasjes Niels Basjes
            virtuald Dustin Spicuzza
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment