diff --git a/data-avro/src/main/java/com/linkedin/data/avro/SchemaTranslator.java b/data-avro/src/main/java/com/linkedin/data/avro/SchemaTranslator.java index b76bf3650b..75c8624ddb 100644 --- a/data-avro/src/main/java/com/linkedin/data/avro/SchemaTranslator.java +++ b/data-avro/src/main/java/com/linkedin/data/avro/SchemaTranslator.java @@ -175,13 +175,10 @@ public static DataSchema avroToDataSchema(String avroSchemaInJson, AvroToDataSch // translationMode == TRANSLATE or no embedded schema DataSchemaTraverse traverse = new DataSchemaTraverse(); - DataSchemaTraverse.Callback callback = (path, schema) -> { - // convert values - AvroToDataSchemaConvertCallback.INSTANCE.callback(path, schema); - // convert default values - DefaultAvroToDataConvertCallback.INSTANCE.callback(path, schema); - }; - traverse.traverse(dataSchema, callback); + // convert values + traverse.traverse(dataSchema, AvroToDataSchemaConvertCallback.INSTANCE); + // convert default values + traverse.traverse(dataSchema, DefaultAvroToDataConvertCallback.INSTANCE); // make sure it can round-trip if configured to do so. if (options.shouldRoundTripTranslatedSchemas())