File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
src/main/java/com/github/fge/avro/translators Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff 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" );
Original file line number Diff line number Diff line change 1818
1919package com .github .fge .avro .translators ;
2020
21+ import com .fasterxml .jackson .databind .JsonNode ;
22+ import com .fasterxml .jackson .databind .ObjectMapper ;
2123import com .fasterxml .jackson .databind .node .ArrayNode ;
2224import com .fasterxml .jackson .databind .node .ObjectNode ;
2325import com .github .fge .avro .MutableTree ;
2729import com .github .fge .jsonschema .core .exceptions .ProcessingException ;
2830import com .github .fge .jsonschema .core .report .ProcessingReport ;
2931import org .apache .avro .Schema ;
30- import org .codehaus .jackson .JsonNode ;
31- import org .codehaus .jackson .map .ObjectMapper ;
3232
3333import java .io .IOException ;
3434import 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
You can’t perform that action at this time.
0 commit comments