diff --git a/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/schema/RecordVisitor.java b/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/schema/RecordVisitor.java index f49f129b2..04339119b 100644 --- a/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/schema/RecordVisitor.java +++ b/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/schema/RecordVisitor.java @@ -199,19 +199,6 @@ protected Schema.Field schemaFieldForWriter(BeanProperty prop, boolean optional) writerSchema = AvroSchemaHelper.unionWithNull(writerSchema); } } -/* - JsonNode defaultValue = parseJson(prop.getMetadata().getDefaultValue()); - if ((defaultValue == null) && _cfgAddNullDefaults - && writerSchema.getType() == Type.UNION - && writerSchema.getIndexNamed(Type.NULL.getName()) != null) { - defaultValue = NullNode.getInstance(); - } - writerSchema = reorderUnionToMatchDefaultType(writerSchema, defaultValue); - - String name = prop.getName(); - Schema.Field field = new Schema.Field(name, writerSchema, prop.getMetadata().getDescription(), - JacksonUtils.toObject(defaultValue)); -*/ JsonNode defaultValue = AvroSchemaHelper.parseDefaultValue(prop.getMetadata().getDefaultValue()); // [dataformats-binary#145]: induce `null` default value, if compatible