Skip to content

Commit e63aa3c

Browse files
committed
Fix #645
1 parent 916377d commit e63aa3c

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

avro/src/main/java/com/fasterxml/jackson/dataformat/avro/AvroMapper.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ protected JsonMappingException _invalidSchemaDefinition(JavaType type,
237237
public AvroSchema schemaFrom(InputStream in) throws IOException
238238
{
239239
try {
240-
return new AvroSchema(new Schema.Parser().setValidate(true)
240+
return new AvroSchema(new Schema.Parser()
241241
.parse(in));
242242
} finally {
243243
in.close();
@@ -254,7 +254,7 @@ public AvroSchema schemaFrom(InputStream in) throws IOException
254254
*/
255255
public AvroSchema schemaFrom(String schemaAsString) throws IOException
256256
{
257-
return new AvroSchema(new Schema.Parser().setValidate(true)
257+
return new AvroSchema(new Schema.Parser()
258258
.parse(schemaAsString));
259259
}
260260

@@ -268,7 +268,7 @@ public AvroSchema schemaFrom(String schemaAsString) throws IOException
268268
*/
269269
public AvroSchema schemaFrom(File schemaFile) throws IOException
270270
{
271-
return new AvroSchema(new Schema.Parser().setValidate(true)
271+
return new AvroSchema(new Schema.Parser()
272272
.parse(schemaFile));
273273
}
274274
}

avro/src/test/java/perf/PerfBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ protected GenericRecord itemToRecord(MediaItem item) throws IOException
139139
}
140140

141141
protected static AvroSchema itemSchema() {
142-
return new AvroSchema(new Schema.Parser().setValidate(true).parse(JVM_SERIALIZERS_SCHEMA_STR));
142+
return new AvroSchema(new Schema.Parser().parse(JVM_SERIALIZERS_SCHEMA_STR));
143143
}
144144

145145
protected static MediaItem buildItem()

release-notes/VERSION-2.x

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Active maintainers:
1616

1717
2.18.6 (not yet released)
1818

19+
#645: (avro) Remove use of Avro `Schema.Parser().setValidate()` to allow
20+
use of Avro core 1.12.1 (2.x)
1921
#649: (cbor, smile) `StreamReadConstraints.maxDocumentLength` not checked
2022
when creating parser with fixed buffer
2123

0 commit comments

Comments
 (0)