Skip to content

Commit e7ccdc9

Browse files
authored
Fix #514: upgrade to avro-core 1.12.1 (#644)
1 parent be43ad6 commit e7ccdc9

5 files changed

Lines changed: 7 additions & 9 deletions

File tree

avro/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ String SCHEMA_JSON = "{\n"
5353
+" {\"name\": \"emails\", \"type\": {\"type\": \"array\", \"items\": \"string\"}},\n"
5454
+" {\"name\": \"boss\", \"type\": [\"Employee\",\"null\"]}\n"
5555
+"]}";
56-
Schema raw = new Schema.Parser().setValidate(true).parse(SCHEMA_JSON);
56+
Schema raw = new Schema.Parser().parse(SCHEMA_JSON);
5757
AvroSchema schema = new AvroSchema(raw);
5858
```
5959

avro/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ abstractions.
5252
<dependency>
5353
<groupId>org.apache.avro</groupId>
5454
<artifactId>avro</artifactId>
55-
<version>1.11.5</version>
55+
<version>1.12.1</version>
5656
</dependency>
5757

5858
<!-- and for testing we need logback -->

avro/src/main/java/tools/jackson/dataformat/avro/AvroMapper.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,7 @@ protected JacksonException _invalidSchemaDefinition(JavaType type,
281281
public AvroSchema schemaFrom(InputStream in) throws IOException
282282
{
283283
try {
284-
return new AvroSchema(new Schema.Parser().setValidate(true)
285-
.parse(in));
284+
return new AvroSchema(new Schema.Parser().parse(in));
286285
} finally {
287286
in.close();
288287
}
@@ -296,8 +295,7 @@ public AvroSchema schemaFrom(InputStream in) throws IOException
296295
*/
297296
public AvroSchema schemaFrom(String schemaAsString) throws IOException
298297
{
299-
return new AvroSchema(new Schema.Parser().setValidate(true)
300-
.parse(schemaAsString));
298+
return new AvroSchema(new Schema.Parser().parse(schemaAsString));
301299
}
302300

303301
/**
@@ -308,8 +306,7 @@ public AvroSchema schemaFrom(String schemaAsString) throws IOException
308306
*/
309307
public AvroSchema schemaFrom(File schemaFile) throws IOException
310308
{
311-
return new AvroSchema(new Schema.Parser().setValidate(true)
312-
.parse(schemaFile));
309+
return new AvroSchema(new Schema.Parser().parse(schemaFile));
313310
}
314311

315312
/*

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ implementations)
1616

1717
3.1.0 (not yet released)
1818

19+
#514: (avro) Update to Avro 1.12.1 (Jackson 3.x only)
1920
#598: (protobuf) Protobuf parser state handling wrong for implicit close (END_OBJECT)
2021
(fix by @cowtowncoder, w/ Claude code)
2122
#619: (avro, cbor, ion, smile) Add `isEnabled()` methods for format-specific features

0 commit comments

Comments
 (0)