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

Case "FIXED" not handled in ResolvingGrammarGenerator

    Details

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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: