Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5995#discussion_r188355390
  
    --- Diff: 
flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSerializer.java
 ---
    @@ -99,9 +108,29 @@
     
        /**
         * Creates a new AvroSerializer for the type indicated by the given 
class.
    +    * This constructor is intended to be used with {@link SpecificRecord} 
or reflection serializer.
    +    * For serializing {@link GenericData.Record} use {@link 
AvroSerializer#AvroSerializer(Class, Schema)}
         */
        public AvroSerializer(Class<T> type) {
    +           Preconditions.checkArgument(!isGenericRecord(type),
    --- End diff --
    
    Minor: Other preconditions checks in this class are done by statically 
imported methods. While this is not consistent within the code base, I would 
suggest to keep this consistent within a class as much as possible.


---

Reply via email to