Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.9.0, 1.8.2
-
None
-
None
Description
final Field writerField = lookupWriterField(writer, readerField); // ---- following block is only entered if writerField is 'null' if (writerField == null) { if (readerField.defaultValue() == null) { if (readerField.schema().getType() == Type.ENUM && readerField.schema().getEnumDefault() != null) { // ---- writerField is accessed result = result.mergedWith(getCompatibility("type", readerField.schema(), writerField.schema(), location)); } else { ...
https://github.com/apache/avro/blob/master/lang/java/avro/src/main/java/org/apache/avro/SchemaCompatibility.java#L417
https://github.com/apache/avro/blob/master/lang/java/avro/src/main/java/org/apache/avro/SchemaCompatibility.java#L424