Skip to content

Commit bacb1f7

Browse files
committed
Update avro to 1.9.1.
Also, since that was pulling in older jackson-databind, remove derelict types used only from the older databind.
1 parent 76cd75a commit bacb1f7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Diff for: project.gradle

+3-1
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ dependencies {
3636
version: "1.2.12");
3737
compile(group: "com.github.java-json-tools", name: "json-schema-validator",
3838
version: "2.2.12");
39-
compile(group: "org.apache.avro", name: "avro", version: "1.7.6") {
39+
compile(group: "org.apache.avro", name: "avro", version: "1.9.1") {
4040
exclude(group: "org.slf4j", module: "slf4j-api");
4141
exclude(group: "org.apache.commons", module: "commons-compress");
4242
exclude(group: "com.thoughtworks.paranamer", module: "paranamer");
4343
exclude(group: "org.xerial.snappy", module: "snappy-java");
4444
}
45+
compile(group: "com.fasterxml.jackson.core", name: "jackson-databind",
46+
version: "2.9.9");
4547
testCompile(group: "org.testng", name: "testng", version: "6.8.7") {
4648
exclude(group: "junit", module: "junit");
4749
exclude(group: "org.beanshell", module: "bsh");

Diff for: src/main/java/com/github/fge/avro/translators/RecordTranslator.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
package com.github.fge.avro.translators;
2020

21+
import com.fasterxml.jackson.databind.JsonNode;
22+
import com.fasterxml.jackson.databind.ObjectMapper;
2123
import com.fasterxml.jackson.databind.node.ArrayNode;
2224
import com.fasterxml.jackson.databind.node.ObjectNode;
2325
import com.github.fge.avro.MutableTree;
@@ -27,8 +29,6 @@
2729
import com.github.fge.jsonschema.core.exceptions.ProcessingException;
2830
import com.github.fge.jsonschema.core.report.ProcessingReport;
2931
import org.apache.avro.Schema;
30-
import org.codehaus.jackson.JsonNode;
31-
import org.codehaus.jackson.map.ObjectMapper;
3232

3333
import java.io.IOException;
3434
import java.util.List;
@@ -109,7 +109,7 @@ protected void doTranslate(final Schema avroSchema,
109109
private static void injectDefault(final ObjectNode propertyNode,
110110
final Schema.Field field)
111111
{
112-
final JsonNode value = field.defaultValue();
112+
final JsonNode value = (JsonNode) field.defaultVal();
113113
if (value == null)
114114
return;
115115

0 commit comments

Comments
 (0)