private static void validateIfAvroSchema ( SerializerDefinition serializerDef ) { if ( serializerDef . getName ( ) . equals ( AVRO_GENERIC_VERSIONED_TYPE_NAME ) || serializerDef . getName ( ) . equals ( AVRO_GENERIC_TYPE_NAME ) ) { SchemaEvolutionValidator . validateAllAvroSchemas ( serializerDef ) ; // check backwards compatibility if needed if ( serializerDef . getName ( ) . equals ( AVRO_GENERIC_VERSIONED_TYPE_NAME ) ) { SchemaEvolutionValidator . checkSchemaCompatibility ( serializerDef ) ; } } }
If provided with an AVRO schema validates it and checks if there are backwards compatible .