Skip to content

Commit

Permalink
Respect useReflectApi parameter (#29518)
Browse files Browse the repository at this point in the history
  • Loading branch information
RustedBones authored Nov 27, 2023
1 parent 2f4c902 commit 8830fab
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public static <T> AvroCoder<T> of(Class<T> clazz) {
public static <T> AvroCoder<T> of(Class<T> type, boolean useReflectApi) {
if (GenericRecord.class.equals(type)) {
throw new IllegalArgumentException("AvroCoder for GenericRecord requires a schema");
} else if (SpecificRecord.class.isAssignableFrom(type) && useReflectApi) {
} else if (SpecificRecord.class.isAssignableFrom(type) && !useReflectApi) {
return specific(type);
} else {
return reflect(type);
Expand Down

0 comments on commit 8830fab

Please sign in to comment.