Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.7.6
-
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