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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.0
    • Fix Version/s: None
    • Component/s: java
    • Labels:
      None
    • Release Note:
      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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: