diff --git a/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/AvroMapper.java b/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/AvroMapper.java index ea16d85bb..d8b515e6a 100644 --- a/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/AvroMapper.java +++ b/avro/src/main/java/com/fasterxml/jackson/dataformat/avro/AvroMapper.java @@ -232,7 +232,7 @@ protected JsonMappingException _invalidSchemaDefinition(JavaType type, public AvroSchema schemaFrom(InputStream in) throws IOException { try { - return new AvroSchema(new Schema.Parser().setValidate(true) + return new AvroSchema(new Schema.Parser() .parse(in)); } finally { in.close(); @@ -249,7 +249,7 @@ public AvroSchema schemaFrom(InputStream in) throws IOException */ public AvroSchema schemaFrom(String schemaAsString) throws IOException { - return new AvroSchema(new Schema.Parser().setValidate(true) + return new AvroSchema(new Schema.Parser() .parse(schemaAsString)); } @@ -263,7 +263,7 @@ public AvroSchema schemaFrom(String schemaAsString) throws IOException */ public AvroSchema schemaFrom(File schemaFile) throws IOException { - return new AvroSchema(new Schema.Parser().setValidate(true) + return new AvroSchema(new Schema.Parser() .parse(schemaFile)); } } diff --git a/avro/src/test/java/perf/PerfBase.java b/avro/src/test/java/perf/PerfBase.java index 04b194918..dae019f09 100644 --- a/avro/src/test/java/perf/PerfBase.java +++ b/avro/src/test/java/perf/PerfBase.java @@ -137,7 +137,7 @@ protected GenericRecord itemToRecord(MediaItem item) throws IOException } protected static AvroSchema itemSchema() { - return new AvroSchema(new Schema.Parser().setValidate(true).parse(JVM_SERIALIZERS_SCHEMA_STR)); + return new AvroSchema(new Schema.Parser().parse(JVM_SERIALIZERS_SCHEMA_STR)); } protected static MediaItem buildItem() diff --git a/release-notes/VERSION-2.x b/release-notes/VERSION-2.x index aa897051c..c991548af 100644 --- a/release-notes/VERSION-2.x +++ b/release-notes/VERSION-2.x @@ -14,6 +14,11 @@ Active maintainers: === Releases === ------------------------------------------------------------------------ +2.21.1 (not yet released) + +#645: (avro) Remove use of Avro `Schema.Parser().setValidate()` to allow + use of Avro core 1.12.1 (2.x) + 2.21.0 (18-Jan-2026) #599: (cbor) Unable to deserialize stringref-enabled CBOR with ignored properties