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

Case "FIXED" not handled in ResolvingGrammarGenerator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.6
    • 1.7.7
    • java
    • This bug-fix does not introduce any backwards incompatibilities. In practice, it replaces one error message (RuntimeException) with another (an ErrorSymbol that eventually leads to an AvroTypeException).

    Description

      Symptom: Attempts to match reader = FIXED against writer != FIXED results in a RuntimeException ("Unexpected schema type: FIXED"), rather than an appropriate Symbol.ErrorAction.

      Reason: In the ResolvingGrammarGenerator.generate method, there are two switch statements, one for writerType == readerType and the other for writerType != readerType. In the latter, "case FIXED:" is missing.

      This is true in the GitHub version (HEAD?) as well: https://github.com/apache/avro/blob/branch-1.3/lang/java/src/java/org/apache/avro/io/parsing/ResolvingGrammarGenerator.java#L155

      Attachments

        1. AVRO-1442.patch
          3 kB
          Doug Cutting

        Activity

          People

            jpivarski Jim Pivarski
            jpivarski Jim Pivarski
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: