avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [avro] branch master updated: Update Jackson to 2.9.7. This changes a LOT of API's due to Jackson's package rename, but for the most part it's search/replace type changes
Date Fri, 02 Nov 2018 19:16:56 GMT
This is an automated email from the ASF dual-hosted git repository.

dkulp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/master by this push:
     new 95234db  Update Jackson to 2.9.7.  This changes a LOT of API's due to Jackson's package rename, but for the most part it's search/replace type changes
95234db is described below

commit 95234db14b7afca9593829f43c41a9851e08dcd7
Author: Daniel Kulp <dkulp@apache.org>
AuthorDate: Fri Nov 2 15:15:27 2018 -0400

    Update Jackson to 2.9.7.  This changes a LOT of API's due to Jackson's package rename, but for the most part it's search/replace type changes
---
 .../avro-service-archetype/src/main/pom/pom.xml    |  8 +--
 lang/java/avro/pom.xml                             | 10 ++--
 .../main/java/org/apache/avro/JsonProperties.java  | 12 ++--
 .../src/main/java/org/apache/avro/Protocol.java    | 33 +++++-----
 .../avro/src/main/java/org/apache/avro/Schema.java | 41 ++++++-------
 .../main/java/org/apache/avro/SchemaBuilder.java   |  9 +--
 .../src/main/java/org/apache/avro/data/Json.java   | 32 +++++-----
 .../java/org/apache/avro/generic/GenericData.java  |  3 +-
 .../java/org/apache/avro/io/EncoderFactory.java    |  2 +-
 .../main/java/org/apache/avro/io/JsonDecoder.java  | 70 +++++++++++++++++++---
 .../main/java/org/apache/avro/io/JsonEncoder.java  | 10 ++--
 .../avro/io/parsing/ResolvingGrammarGenerator.java | 23 +++----
 .../java/org/apache/avro/reflect/ReflectData.java  |  4 +-
 .../apache/avro/util/internal/JacksonUtils.java    | 17 +++---
 .../java/org/apache/avro/TestSchemaBuilder.java    |  3 +-
 .../org/apache/avro/generic/TestGenericData.java   |  8 +--
 .../java/org/apache/avro/io/TestBlockingIO.java    |  4 +-
 .../test/java/org/apache/avro/io/TestEncoders.java |  6 +-
 .../io/parsing/TestResolvingGrammarGenerator.java  |  6 +-
 .../java/org/apache/avro/reflect/TestReflect.java  |  3 +-
 .../avro/util/internal/TestJacksonUtils.java       | 21 +++----
 lang/java/compiler/pom.xml                         |  8 +--
 .../avro/compiler/specific/SpecificCompiler.java   |  8 +--
 .../javacc/org/apache/avro/compiler/idl/idl.jj     |  8 +--
 .../java/org/apache/avro/compiler/idl/TestIdl.java |  4 +-
 lang/java/ipc/pom.xml                              | 10 ++--
 .../org/apache/avro/specific/TestSpecificData.java |  6 +-
 lang/java/mapred/pom.xml                           |  8 +--
 .../src/test/resources/unit/idl/pom-joda.xml       |  6 +-
 .../src/test/resources/unit/idl/pom-jsr310.xml     |  6 +-
 .../src/test/resources/unit/protocol/pom-joda.xml  |  6 +-
 .../test/resources/unit/protocol/pom-jsr310.xml    |  6 +-
 .../src/test/resources/unit/schema/pom-joda.xml    |  6 +-
 .../src/test/resources/unit/schema/pom-jsr310.xml  |  6 +-
 lang/java/pom.xml                                  | 10 ++--
 lang/java/protobuf/pom.xml                         | 10 ++--
 .../org/apache/avro/protobuf/ProtobufData.java     |  8 +--
 lang/java/thrift/pom.xml                           |  5 +-
 lang/java/tools/pom.xml                            |  5 +-
 .../java/org/apache/avro/tool/RpcSendTool.java     |  6 +-
 .../org/apache/avro/tool/TrevniMetadataTool.java   |  8 +--
 .../org/apache/avro/tool/TrevniToJsonTool.java     |  8 +--
 42 files changed, 262 insertions(+), 211 deletions(-)

diff --git a/lang/java/archetypes/avro-service-archetype/src/main/pom/pom.xml b/lang/java/archetypes/avro-service-archetype/src/main/pom/pom.xml
index 4db3b95..d611e69 100644
--- a/lang/java/archetypes/avro-service-archetype/src/main/pom/pom.xml
+++ b/lang/java/archetypes/avro-service-archetype/src/main/pom/pom.xml
@@ -48,13 +48,13 @@
       <version>\${avro.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-core-asl</artifactId>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-core</artifactId>
       <version>\${jackson.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-mapper-asl</artifactId>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
       <version>\${jackson.version}</version>
     </dependency>
     <dependency>
diff --git a/lang/java/avro/pom.xml b/lang/java/avro/pom.xml
index a71b5c8..999cea1 100644
--- a/lang/java/avro/pom.xml
+++ b/lang/java/avro/pom.xml
@@ -39,7 +39,7 @@
       !org.apache.avro*,
       !com.google.common*,
       com.thoughtworks.paranamer,
-      org.codehaus.jackson*,
+      com.fasterxml.jackson*,
       org.xerial.snappy;resolution:=optional,
       sun.misc;resolution:=optional,
       *
@@ -171,12 +171,12 @@
       <version>${project.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-core-asl</artifactId>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-core</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-mapper-asl</artifactId>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
     </dependency>
     <dependency>
       <groupId>com.thoughtworks.paranamer</groupId>
diff --git a/lang/java/avro/src/main/java/org/apache/avro/JsonProperties.java b/lang/java/avro/src/main/java/org/apache/avro/JsonProperties.java
index 1592950..97493fc 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/JsonProperties.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/JsonProperties.java
@@ -24,9 +24,11 @@ import java.util.Set;
 import java.io.IOException;
 
 import org.apache.avro.util.internal.JacksonUtils;
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.node.TextNode;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.TextNode;
+
 
 /**
  * Base class for objects that have JSON-valued properties. Avro and JSON values are
@@ -128,7 +130,7 @@ public abstract class JsonProperties {
    */
   public String getProp(String name) {
     JsonNode value = getJsonProp(name);
-    return value != null && value.isTextual() ? value.getTextValue() : null;
+    return value != null && value.isTextual() ? value.textValue() : null;
   }
 
   /**
@@ -196,7 +198,7 @@ public abstract class JsonProperties {
     Map<String,String> result = new LinkedHashMap<>();
     for (Map.Entry<String,JsonNode> e : props.entrySet())
       if (e.getValue().isTextual())
-        result.put(e.getKey(), e.getValue().getTextValue());
+        result.put(e.getKey(), e.getValue().textValue());
     return result;
   }
 
diff --git a/lang/java/avro/src/main/java/org/apache/avro/Protocol.java b/lang/java/avro/src/main/java/org/apache/avro/Protocol.java
index 9073623..f4a184e 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/Protocol.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/Protocol.java
@@ -34,10 +34,11 @@ import java.util.Set;
 import java.util.HashSet;
 
 import org.apache.avro.Schema.Field;
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.JsonParser;
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.node.TextNode;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.TextNode;
 
 /** A set of messages forming an application protocol.
  * <p> A protocol consists of:
@@ -393,7 +394,7 @@ public class Protocol extends JsonProperties {
   private static Protocol parse(JsonParser parser) {
     try {
       Protocol protocol = new Protocol();
-      protocol.parse(Schema.MAPPER.readTree(parser));
+      protocol.parse((JsonNode)Schema.MAPPER.readTree(parser));
       return protocol;
     } catch (IOException e) {
       throw new SchemaParseException(e);
@@ -412,7 +413,7 @@ public class Protocol extends JsonProperties {
   private void parseNamespace(JsonNode json) {
     JsonNode nameNode = json.get("namespace");
     if (nameNode == null) return;                 // no namespace defined
-    this.namespace = nameNode.getTextValue();
+    this.namespace = nameNode.textValue();
     types.space(this.namespace);
   }
 
@@ -423,14 +424,14 @@ public class Protocol extends JsonProperties {
   private String parseDocNode(JsonNode json) {
     JsonNode nameNode = json.get("doc");
     if (nameNode == null) return null;                 // no doc defined
-    return nameNode.getTextValue();
+    return nameNode.textValue();
   }
 
   private void parseName(JsonNode json) {
     JsonNode nameNode = json.get("protocol");
     if (nameNode == null)
       throw new SchemaParseException("No protocol name specified: "+json);
-    this.name = nameNode.getTextValue();
+    this.name = nameNode.textValue();
   }
 
   private void parseTypes(JsonNode json) {
@@ -446,7 +447,7 @@ public class Protocol extends JsonProperties {
   }
 
   private void parseProps(JsonNode json) {
-    for (Iterator<String> i = json.getFieldNames(); i.hasNext();) {
+    for (Iterator<String> i = json.fieldNames(); i.hasNext();) {
       String p = i.next();                        // add non-reserved as props
       if (!PROTOCOL_RESERVED.contains(p))
         this.addProp(p, json.get(p));
@@ -456,7 +457,7 @@ public class Protocol extends JsonProperties {
   private void parseMessages(JsonNode json) {
     JsonNode defs = json.get("messages");
     if (defs == null) return;                    // no messages defined
-    for (Iterator<String> i = defs.getFieldNames(); i.hasNext();) {
+    for (Iterator<String> i = defs.fieldNames(); i.hasNext();) {
       String prop = i.next();
       this.messages.put(prop, parseMessage(prop, defs.get(prop)));
     }
@@ -466,7 +467,7 @@ public class Protocol extends JsonProperties {
     String doc = parseDocNode(json);
 
     Map<String,JsonNode> mProps = new LinkedHashMap<>();
-    for (Iterator<String> i = json.getFieldNames(); i.hasNext();) {
+    for (Iterator<String> i = json.fieldNames(); i.hasNext();) {
       String p = i.next();                        // add non-reserved as props
       if (!MESSAGE_RESERVED.contains(p))
         mProps.put(p, json.get(p));
@@ -483,11 +484,11 @@ public class Protocol extends JsonProperties {
       JsonNode fieldTypeNode = field.get("type");
       if (fieldTypeNode == null)
         throw new SchemaParseException("No param type: "+field);
-      String name = fieldNameNode.getTextValue();
+      String name = fieldNameNode.textValue();
       String fieldDoc = null;
       JsonNode fieldDocNode = field.get("doc");
       if (fieldDocNode != null)
-        fieldDoc = fieldDocNode.getTextValue();
+        fieldDoc = fieldDocNode.textValue();
       Field newField = new Field(name, Schema.parse(fieldTypeNode,types),
                                  fieldDoc, field.get("default"));
       Set<String> aliases = Schema.parseAliases(field);
@@ -496,7 +497,7 @@ public class Protocol extends JsonProperties {
           newField.addAlias(alias);
       }
 
-      Iterator<String> i = field.getFieldNames();
+      Iterator<String> i = field.fieldNames();
       while (i.hasNext()) {                       // add properties
         String prop = i.next();
         if (!FIELD_RESERVED.contains(prop))      // ignore reserved
@@ -511,7 +512,7 @@ public class Protocol extends JsonProperties {
     if (oneWayNode != null) {
       if (!oneWayNode.isBoolean())
         throw new SchemaParseException("one-way must be boolean: "+json);
-      oneWay = oneWayNode.getBooleanValue();
+      oneWay = oneWayNode.booleanValue();
     }
 
     JsonNode responseNode = json.get("response");
@@ -537,7 +538,7 @@ public class Protocol extends JsonProperties {
       if (!decls.isArray())
         throw new SchemaParseException("Errors not an array: "+json);
       for (JsonNode decl : decls) {
-        String name = decl.getTextValue();
+        String name = decl.textValue();
         Schema schema = this.types.get(name);
         if (schema == null)
           throw new SchemaParseException("Undefined error: "+name);
diff --git a/lang/java/avro/src/main/java/org/apache/avro/Schema.java b/lang/java/avro/src/main/java/org/apache/avro/Schema.java
index 9fcbfd3..280492c 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/Schema.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/Schema.java
@@ -37,13 +37,14 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.avro.util.internal.JacksonUtils;
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.JsonParseException;
-import org.codehaus.jackson.JsonParser;
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.node.DoubleNode;
+
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.DoubleNode;
 
 /** An abstract data type.
  * <p>A schema may be one of:
@@ -489,8 +490,8 @@ public abstract class Schema extends JsonProperties {
         return thatDefaultValue == null;
       if (thatDefaultValue == null)
         return false;
-      if (Double.isNaN(defaultValue.getDoubleValue()))
-        return Double.isNaN(thatDefaultValue.getDoubleValue());
+      if (Double.isNaN(defaultValue.doubleValue()))
+        return Double.isNaN(thatDefaultValue.doubleValue());
       return defaultValue.equals(thatDefaultValue);
     }
 
@@ -1260,7 +1261,7 @@ public abstract class Schema extends JsonProperties {
       throw new SchemaParseException("Cannot parse <null> schema");
     }
     if (schema.isTextual()) {                     // name
-      Schema result = names.get(schema.getTextValue());
+      Schema result = names.get(schema.textValue());
       if (result == null)
         throw new SchemaParseException("Undefined name: "+schema);
       return result;
@@ -1298,7 +1299,7 @@ public abstract class Schema extends JsonProperties {
           if (fieldTypeNode == null)
             throw new SchemaParseException("No field type: "+field);
           if (fieldTypeNode.isTextual()
-              && names.get(fieldTypeNode.getTextValue()) == null)
+              && names.get(fieldTypeNode.textValue()) == null)
             throw new SchemaParseException
               (fieldTypeNode+" is not a defined name."
                +" The type of the \""+fieldName+"\" field must be"
@@ -1307,17 +1308,17 @@ public abstract class Schema extends JsonProperties {
           Field.Order order = Field.Order.ASCENDING;
           JsonNode orderNode = field.get("order");
           if (orderNode != null)
-            order = Field.Order.valueOf(orderNode.getTextValue().toUpperCase(Locale.ENGLISH));
+            order = Field.Order.valueOf(orderNode.textValue().toUpperCase(Locale.ENGLISH));
           JsonNode defaultValue = field.get("default");
           if (defaultValue != null
               && (Type.FLOAT.equals(fieldSchema.getType())
                   || Type.DOUBLE.equals(fieldSchema.getType()))
               && defaultValue.isTextual())
             defaultValue =
-              new DoubleNode(Double.valueOf(defaultValue.getTextValue()));
+              new DoubleNode(Double.valueOf(defaultValue.textValue()));
           Field f = new Field(fieldName, fieldSchema,
                               fieldDoc, defaultValue, order);
-          Iterator<String> i = field.getFieldNames();
+          Iterator<String> i = field.fieldNames();
           while (i.hasNext()) {                       // add field props
             String prop = i.next();
             if (!FIELD_RESERVED.contains(prop))
@@ -1333,11 +1334,11 @@ public abstract class Schema extends JsonProperties {
           throw new SchemaParseException("Enum has no symbols: "+schema);
         LockableArrayList<String> symbols = new LockableArrayList<>(symbolsNode.size());
         for (JsonNode n : symbolsNode)
-          symbols.add(n.getTextValue());
+          symbols.add(n.textValue());
         JsonNode enumDefault = schema.get("default");
         String defaultSymbol = null;
         if (enumDefault != null)
-          defaultSymbol = enumDefault.getTextValue();
+          defaultSymbol = enumDefault.textValue();
         result = new EnumSchema(name, doc, symbols, defaultSymbol);
         if (name != null) names.add(result);
       } else if (type.equals("array")) {          // array
@@ -1354,11 +1355,11 @@ public abstract class Schema extends JsonProperties {
         JsonNode sizeNode = schema.get("size");
         if (sizeNode == null || !sizeNode.isInt())
           throw new SchemaParseException("Invalid or no size: "+schema);
-        result = new FixedSchema(name, doc, sizeNode.getIntValue());
+        result = new FixedSchema(name, doc, sizeNode.intValue());
         if (name != null) names.add(result);
       } else
         throw new SchemaParseException("Type not supported: "+type);
-      Iterator<String> i = schema.getFieldNames();
+      Iterator<String> i = schema.fieldNames();
 
       Set reserved = SCHEMA_RESERVED;
       if (type.equals("enum")) {
@@ -1400,7 +1401,7 @@ public abstract class Schema extends JsonProperties {
     for (JsonNode aliasNode : aliasesNode) {
       if (!aliasNode.isTextual())
         throw new SchemaParseException("alias not a string: "+aliasNode);
-      aliases.add(aliasNode.getTextValue());
+      aliases.add(aliasNode.textValue());
     }
     return aliases;
   }
@@ -1424,7 +1425,7 @@ public abstract class Schema extends JsonProperties {
   /** Extracts text value associated to key from the container JsonNode. */
   private static String getOptionalText(JsonNode container, String key) {
     JsonNode jsonNode = container.get(key);
-    return jsonNode != null ? jsonNode.getTextValue() : null;
+    return jsonNode != null ? jsonNode.textValue() : null;
   }
 
   /**
diff --git a/lang/java/avro/src/main/java/org/apache/avro/SchemaBuilder.java b/lang/java/avro/src/main/java/org/apache/avro/SchemaBuilder.java
index b8b1153..04fd1d2 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/SchemaBuilder.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/SchemaBuilder.java
@@ -31,10 +31,11 @@ import org.apache.avro.Schema.Field;
 import org.apache.avro.generic.GenericData;
 import org.apache.avro.generic.GenericRecord;
 import org.apache.avro.util.internal.JacksonUtils;
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.io.JsonStringEncoder;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.node.TextNode;
+
+import com.fasterxml.jackson.core.io.JsonStringEncoder;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.TextNode;
 
 /**
  * <p>
diff --git a/lang/java/avro/src/main/java/org/apache/avro/data/Json.java b/lang/java/avro/src/main/java/org/apache/avro/data/Json.java
index b3285d0..c4f75e6 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/data/Json.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/data/Json.java
@@ -23,18 +23,18 @@ import java.io.StringReader;
 import java.util.Iterator;
 
 import org.apache.avro.util.internal.JacksonUtils;
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.JsonParseException;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.node.JsonNodeFactory;
-import org.codehaus.jackson.node.LongNode;
-import org.codehaus.jackson.node.DoubleNode;
-import org.codehaus.jackson.node.TextNode;
-import org.codehaus.jackson.node.BooleanNode;
-import org.codehaus.jackson.node.NullNode;
-import org.codehaus.jackson.node.ArrayNode;
-import org.codehaus.jackson.node.ObjectNode;
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
+import com.fasterxml.jackson.databind.node.LongNode;
+import com.fasterxml.jackson.databind.node.DoubleNode;
+import com.fasterxml.jackson.databind.node.TextNode;
+import com.fasterxml.jackson.databind.node.BooleanNode;
+import com.fasterxml.jackson.databind.node.NullNode;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 
 import org.apache.avro.Schema;
 import org.apache.avro.AvroRuntimeException;
@@ -188,15 +188,15 @@ public class Json {
     switch(node.asToken()) {
     case VALUE_NUMBER_INT:
       out.writeIndex(JsonType.LONG.ordinal());
-      out.writeLong(node.getLongValue());
+      out.writeLong(node.longValue());
       break;
     case VALUE_NUMBER_FLOAT:
       out.writeIndex(JsonType.DOUBLE.ordinal());
-      out.writeDouble(node.getDoubleValue());
+      out.writeDouble(node.doubleValue());
       break;
     case VALUE_STRING:
       out.writeIndex(JsonType.STRING.ordinal());
-      out.writeString(node.getTextValue());
+      out.writeString(node.textValue());
       break;
     case VALUE_TRUE:
       out.writeIndex(JsonType.BOOLEAN.ordinal());
@@ -224,7 +224,7 @@ public class Json {
       out.writeIndex(JsonType.OBJECT.ordinal());
       out.writeMapStart();
       out.setItemCount(node.size());
-      Iterator<String> i = node.getFieldNames();
+      Iterator<String> i = node.fieldNames();
       while (i.hasNext()) {
         out.startItem();
         String name = i.next();
diff --git a/lang/java/avro/src/main/java/org/apache/avro/generic/GenericData.java b/lang/java/avro/src/main/java/org/apache/avro/generic/GenericData.java
index 8b8a296..835d3a0 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/generic/GenericData.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/generic/GenericData.java
@@ -52,8 +52,7 @@ import org.apache.avro.io.DatumWriter;
 import org.apache.avro.io.parsing.ResolvingGrammarGenerator;
 import org.apache.avro.util.Utf8;
 
-import org.codehaus.jackson.JsonNode;
-
+import com.fasterxml.jackson.databind.JsonNode;
 import com.google.common.collect.MapMaker;
 
 /** Utilities for generic Java data. See {@link GenericRecordBuilder} for a convenient
diff --git a/lang/java/avro/src/main/java/org/apache/avro/io/EncoderFactory.java b/lang/java/avro/src/main/java/org/apache/avro/io/EncoderFactory.java
index 941c199..52c52a6 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/io/EncoderFactory.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/io/EncoderFactory.java
@@ -22,7 +22,7 @@ import java.io.OutputStream;
 
 import org.apache.avro.AvroRuntimeException;
 import org.apache.avro.Schema;
-import org.codehaus.jackson.JsonGenerator;
+import com.fasterxml.jackson.core.JsonGenerator;
 
 /**
  * A factory for creating and configuring {@link Encoder} instances.
diff --git a/lang/java/avro/src/main/java/org/apache/avro/io/JsonDecoder.java b/lang/java/avro/src/main/java/org/apache/avro/io/JsonDecoder.java
index 1dcb8dd..7ffd5cf 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/io/JsonDecoder.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/io/JsonDecoder.java
@@ -35,13 +35,14 @@ import org.apache.avro.io.parsing.JsonGrammarGenerator;
 import org.apache.avro.io.parsing.Parser;
 import org.apache.avro.io.parsing.Symbol;
 import org.apache.avro.util.Utf8;
-import org.codehaus.jackson.Base64Variant;
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.JsonLocation;
-import org.codehaus.jackson.JsonParser;
-import org.codehaus.jackson.JsonStreamContext;
-import org.codehaus.jackson.JsonToken;
-import org.codehaus.jackson.ObjectCodec;
+import com.fasterxml.jackson.core.Base64Variant;
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.core.JsonLocation;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonStreamContext;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.core.ObjectCodec;
+import com.fasterxml.jackson.core.Version;
 
 /** A {@link Decoder} for Avro's JSON data encoding.
  * </p>
@@ -695,6 +696,61 @@ public class JsonDecoder extends ParsingDecoder
       public JsonToken getCurrentToken() {
         return elements.get(pos).token;
       }
+
+      @Override
+      public Version version() {
+        throw new UnsupportedOperationException();
+      }
+
+      @Override
+      public JsonToken nextValue() throws IOException {
+        throw new UnsupportedOperationException();
+      }
+
+      @Override
+      public int getCurrentTokenId() {
+        throw new UnsupportedOperationException();
+      }
+
+      @Override
+      public boolean hasCurrentToken() {
+        throw new UnsupportedOperationException();
+      }
+
+      @Override
+      public boolean hasTokenId(int id) {
+        throw new UnsupportedOperationException();
+      }
+
+      @Override
+      public boolean hasToken(JsonToken t) {
+        throw new UnsupportedOperationException();
+      }
+
+      @Override
+      public void clearCurrentToken() {
+        throw new UnsupportedOperationException();
+      }
+
+      @Override
+      public JsonToken getLastClearedToken() {
+        throw new UnsupportedOperationException();
+      }
+
+      @Override
+      public void overrideCurrentName(String name) {
+        throw new UnsupportedOperationException();
+      }
+
+      @Override
+      public boolean hasTextCharacters() {
+        throw new UnsupportedOperationException();
+      }
+
+      @Override
+      public String getValueAsString(String def) throws IOException {
+        throw new UnsupportedOperationException();
+      }
     };
   }
 
diff --git a/lang/java/avro/src/main/java/org/apache/avro/io/JsonEncoder.java b/lang/java/avro/src/main/java/org/apache/avro/io/JsonEncoder.java
index 426b86c..3328d9f 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/io/JsonEncoder.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/io/JsonEncoder.java
@@ -28,11 +28,11 @@ import org.apache.avro.io.parsing.JsonGrammarGenerator;
 import org.apache.avro.io.parsing.Parser;
 import org.apache.avro.io.parsing.Symbol;
 import org.apache.avro.util.Utf8;
-import org.codehaus.jackson.JsonEncoding;
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.util.DefaultPrettyPrinter;
-import org.codehaus.jackson.util.MinimalPrettyPrinter;
+import com.fasterxml.jackson.core.JsonEncoding;
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.util.DefaultPrettyPrinter;
+import com.fasterxml.jackson.core.util.MinimalPrettyPrinter;
 
 /** An {@link Encoder} for Avro's JSON data encoding.
  * </p>
diff --git a/lang/java/avro/src/main/java/org/apache/avro/io/parsing/ResolvingGrammarGenerator.java b/lang/java/avro/src/main/java/org/apache/avro/io/parsing/ResolvingGrammarGenerator.java
index 51d9bc9..47e12a9 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/io/parsing/ResolvingGrammarGenerator.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/io/parsing/ResolvingGrammarGenerator.java
@@ -30,7 +30,8 @@ import org.apache.avro.Schema;
 import org.apache.avro.Schema.Field;
 import org.apache.avro.io.Encoder;
 import org.apache.avro.io.EncoderFactory;
-import org.codehaus.jackson.JsonNode;
+
+import com.fasterxml.jackson.databind.JsonNode;
 
 /**
  * The class that generates a resolving grammar to resolve between two
@@ -336,7 +337,7 @@ public class ResolvingGrammarGenerator extends ValidatingGrammarGenerator {
       }
       break;
     case ENUM:
-      e.writeEnum(s.getEnumOrdinal(n.getTextValue()));
+      e.writeEnum(s.getEnumOrdinal(n.textValue()));
       break;
     case ARRAY:
       e.writeArrayStart();
@@ -352,7 +353,7 @@ public class ResolvingGrammarGenerator extends ValidatingGrammarGenerator {
       e.writeMapStart();
       e.setItemCount(n.size());
       Schema v = s.getValueType();
-      for (Iterator<String> it = n.getFieldNames(); it.hasNext();) {
+      for (Iterator<String> it = n.fieldNames(); it.hasNext();) {
         e.startItem();
         String key = it.next();
         e.writeString(key);
@@ -367,7 +368,7 @@ public class ResolvingGrammarGenerator extends ValidatingGrammarGenerator {
     case FIXED:
       if (!n.isTextual())
         throw new AvroTypeException("Non-string default value for fixed: "+n);
-      byte[] bb = n.getTextValue().getBytes("ISO-8859-1");
+      byte[] bb = n.textValue().getBytes("ISO-8859-1");
       if (bb.length != s.getFixedSize()) {
         bb = Arrays.copyOf(bb, s.getFixedSize());
       }
@@ -376,37 +377,37 @@ public class ResolvingGrammarGenerator extends ValidatingGrammarGenerator {
     case STRING:
       if (!n.isTextual())
         throw new AvroTypeException("Non-string default value for string: "+n);
-      e.writeString(n.getTextValue());
+      e.writeString(n.textValue());
       break;
     case BYTES:
       if (!n.isTextual())
         throw new AvroTypeException("Non-string default value for bytes: "+n);
-      e.writeBytes(n.getTextValue().getBytes("ISO-8859-1"));
+      e.writeBytes(n.textValue().getBytes("ISO-8859-1"));
       break;
     case INT:
       if (!n.isNumber())
         throw new AvroTypeException("Non-numeric default value for int: "+n);
-      e.writeInt(n.getIntValue());
+      e.writeInt(n.intValue());
       break;
     case LONG:
       if (!n.isNumber())
         throw new AvroTypeException("Non-numeric default value for long: "+n);
-      e.writeLong(n.getLongValue());
+      e.writeLong(n.longValue());
       break;
     case FLOAT:
       if (!n.isNumber())
         throw new AvroTypeException("Non-numeric default value for float: "+n);
-      e.writeFloat((float) n.getDoubleValue());
+      e.writeFloat((float) n.doubleValue());
       break;
     case DOUBLE:
       if (!n.isNumber())
         throw new AvroTypeException("Non-numeric default value for double: "+n);
-      e.writeDouble(n.getDoubleValue());
+      e.writeDouble(n.doubleValue());
       break;
     case BOOLEAN:
       if (!n.isBoolean())
         throw new AvroTypeException("Non-boolean default for boolean: "+n);
-      e.writeBoolean(n.getBooleanValue());
+      e.writeBoolean(n.booleanValue());
       break;
     case NULL:
       if (!n.isNull())
diff --git a/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectData.java b/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectData.java
index 79558ba..6c59a69 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectData.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectData.java
@@ -38,6 +38,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.NullNode;
 import com.google.common.collect.MapMaker;
 import org.apache.avro.AvroRemoteException;
 import org.apache.avro.AvroRuntimeException;
@@ -58,8 +60,6 @@ import org.apache.avro.io.DatumWriter;
 import org.apache.avro.specific.FixedSize;
 import org.apache.avro.specific.SpecificData;
 import org.apache.avro.SchemaNormalization;
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.node.NullNode;
 
 import com.thoughtworks.paranamer.CachingParanamer;
 import com.thoughtworks.paranamer.Paranamer;
diff --git a/lang/java/avro/src/main/java/org/apache/avro/util/internal/JacksonUtils.java b/lang/java/avro/src/main/java/org/apache/avro/util/internal/JacksonUtils.java
index 351be18..5f5e2fe 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/util/internal/JacksonUtils.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/util/internal/JacksonUtils.java
@@ -28,10 +28,11 @@ import java.util.Map;
 import org.apache.avro.AvroRuntimeException;
 import org.apache.avro.JsonProperties;
 import org.apache.avro.Schema;
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.util.TokenBuffer;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.util.TokenBuffer;
 
 public class JacksonUtils {
   static final String BYTES_CHARSET = "ISO-8859-1";
@@ -44,7 +45,7 @@ public class JacksonUtils {
       return null;
     }
     try {
-      TokenBuffer generator = new TokenBuffer(new ObjectMapper());
+      TokenBuffer generator = new TokenBuffer(new ObjectMapper(), false);
       toJson(datum, generator);
       return new ObjectMapper().readTree(generator.asParser());
     } catch (IOException e) {
@@ -110,7 +111,7 @@ public class JacksonUtils {
       }
     } else if (jsonNode.isLong()) {
       return jsonNode.asLong();
-    } else if (jsonNode.isDouble()) {
+    } else if (jsonNode.isDouble() || jsonNode.isFloat()) {
       if (schema == null || schema.getType().equals(Schema.Type.DOUBLE)) {
         return jsonNode.asDouble();
       } else if (schema.getType().equals(Schema.Type.FLOAT)) {
@@ -123,7 +124,7 @@ public class JacksonUtils {
       } else if (schema.getType().equals(Schema.Type.BYTES)
               || schema.getType().equals(Schema.Type.FIXED)) {
         try {
-          return jsonNode.getTextValue().getBytes(BYTES_CHARSET);
+          return jsonNode.textValue().getBytes(BYTES_CHARSET);
         } catch (UnsupportedEncodingException e) {
           throw new AvroRuntimeException(e);
         }
@@ -136,7 +137,7 @@ public class JacksonUtils {
       return l;
     } else if (jsonNode.isObject()) {
       Map m = new LinkedHashMap();
-      for (Iterator<String> it = jsonNode.getFieldNames(); it.hasNext(); ) {
+      for (Iterator<String> it = jsonNode.fieldNames(); it.hasNext(); ) {
         String key = it.next();
         Schema s = null;
         if (schema == null) {
diff --git a/lang/java/avro/src/test/java/org/apache/avro/TestSchemaBuilder.java b/lang/java/avro/src/test/java/org/apache/avro/TestSchemaBuilder.java
index af15c38..bb0b055 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/TestSchemaBuilder.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/TestSchemaBuilder.java
@@ -35,10 +35,11 @@ import org.apache.avro.generic.GenericData;
 import org.apache.avro.generic.GenericDatumReader;
 import org.apache.avro.generic.GenericDatumWriter;
 import org.apache.avro.generic.GenericRecordBuilder;
-import org.codehaus.jackson.node.NullNode;
 import org.junit.Assert;
 import org.junit.Test;
 
+import com.fasterxml.jackson.databind.node.NullNode;
+
 public class TestSchemaBuilder {
 
   private static final File DIR = new File(System.getProperty("test.dir", "/tmp"));
diff --git a/lang/java/avro/src/test/java/org/apache/avro/generic/TestGenericData.java b/lang/java/avro/src/test/java/org/apache/avro/generic/TestGenericData.java
index 3a81169..8bc160e 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/generic/TestGenericData.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/generic/TestGenericData.java
@@ -44,10 +44,10 @@ import org.apache.avro.io.BinaryEncoder;
 import org.apache.avro.io.EncoderFactory;
 import org.apache.avro.generic.GenericData.Record;
 import org.apache.avro.util.Utf8;
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.JsonParseException;
-import org.codehaus.jackson.JsonParser;
-import org.codehaus.jackson.map.ObjectMapper;
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 import org.junit.Test;
 
diff --git a/lang/java/avro/src/test/java/org/apache/avro/io/TestBlockingIO.java b/lang/java/avro/src/test/java/org/apache/avro/io/TestBlockingIO.java
index 15f0f72..1e6c886 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/io/TestBlockingIO.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/io/TestBlockingIO.java
@@ -25,8 +25,8 @@ import java.util.Stack;
 import java.util.Collection;
 import java.util.Arrays;
 
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.JsonParser;
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.core.JsonParser;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
diff --git a/lang/java/avro/src/test/java/org/apache/avro/io/TestEncoders.java b/lang/java/avro/src/test/java/org/apache/avro/io/TestEncoders.java
index 28795b9..1517693 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/io/TestEncoders.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/io/TestEncoders.java
@@ -32,9 +32,9 @@ import org.apache.avro.Schema;
 import org.apache.avro.Schema.Type;
 import org.apache.avro.generic.GenericDatumReader;
 import org.apache.avro.generic.GenericDatumWriter;
-import org.codehaus.jackson.JsonEncoding;
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.JsonGenerator;
+import com.fasterxml.jackson.core.JsonEncoding;
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.core.JsonGenerator;
 import org.junit.Assert;
 import org.junit.Test;
 
diff --git a/lang/java/avro/src/test/java/org/apache/avro/io/parsing/TestResolvingGrammarGenerator.java b/lang/java/avro/src/test/java/org/apache/avro/io/parsing/TestResolvingGrammarGenerator.java
index f42a634..d96f771 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/io/parsing/TestResolvingGrammarGenerator.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/io/parsing/TestResolvingGrammarGenerator.java
@@ -35,9 +35,9 @@ import org.apache.avro.generic.GenericDatumWriter;
 import org.apache.avro.generic.GenericRecordBuilder;
 import org.apache.avro.io.Encoder;
 import org.apache.avro.io.EncoderFactory;
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.map.ObjectMapper;
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
diff --git a/lang/java/avro/src/test/java/org/apache/avro/reflect/TestReflect.java b/lang/java/avro/src/test/java/org/apache/avro/reflect/TestReflect.java
index 21244fb..cb572f0 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/reflect/TestReflect.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/reflect/TestReflect.java
@@ -47,9 +47,10 @@ import org.apache.avro.io.DecoderFactory;
 import org.apache.avro.io.Encoder;
 import org.apache.avro.io.EncoderFactory;
 import org.apache.avro.reflect.TestReflect.SampleRecord.AnotherSampleRecord;
-import org.codehaus.jackson.node.NullNode;
 import org.junit.Test;
 
+import com.fasterxml.jackson.databind.node.NullNode;
+
 public class TestReflect {
 
   EncoderFactory factory = new EncoderFactory();
diff --git a/lang/java/avro/src/test/java/org/apache/avro/util/internal/TestJacksonUtils.java b/lang/java/avro/src/test/java/org/apache/avro/util/internal/TestJacksonUtils.java
index 579231c..556a91a 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/util/internal/TestJacksonUtils.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/util/internal/TestJacksonUtils.java
@@ -21,15 +21,16 @@ import java.util.Collections;
 import org.apache.avro.JsonProperties;
 import org.apache.avro.Schema;
 import org.apache.avro.SchemaBuilder;
-import org.codehaus.jackson.node.ArrayNode;
-import org.codehaus.jackson.node.BooleanNode;
-import org.codehaus.jackson.node.DoubleNode;
-import org.codehaus.jackson.node.IntNode;
-import org.codehaus.jackson.node.JsonNodeFactory;
-import org.codehaus.jackson.node.LongNode;
-import org.codehaus.jackson.node.NullNode;
-import org.codehaus.jackson.node.ObjectNode;
-import org.codehaus.jackson.node.TextNode;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.BooleanNode;
+import com.fasterxml.jackson.databind.node.DoubleNode;
+import com.fasterxml.jackson.databind.node.FloatNode;
+import com.fasterxml.jackson.databind.node.IntNode;
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
+import com.fasterxml.jackson.databind.node.LongNode;
+import com.fasterxml.jackson.databind.node.NullNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.fasterxml.jackson.databind.node.TextNode;
 import org.junit.Test;
 
 import static org.apache.avro.util.internal.JacksonUtils.toJsonNode;
@@ -50,7 +51,7 @@ public class TestJacksonUtils {
     assertEquals(BooleanNode.TRUE, toJsonNode(true));
     assertEquals(IntNode.valueOf(1), toJsonNode(1));
     assertEquals(LongNode.valueOf(2), toJsonNode(2L));
-    assertEquals(DoubleNode.valueOf(1.0), toJsonNode(1.0f));
+    assertEquals(FloatNode.valueOf(1.0f), toJsonNode(1.0f));
     assertEquals(DoubleNode.valueOf(2.0), toJsonNode(2.0));
     assertEquals(TextNode.valueOf("\u0001\u0002"), toJsonNode(new byte[] { 1, 2 }));
     assertEquals(TextNode.valueOf("a"), toJsonNode("a"));
diff --git a/lang/java/compiler/pom.xml b/lang/java/compiler/pom.xml
index c7cef91..ec221d4 100644
--- a/lang/java/compiler/pom.xml
+++ b/lang/java/compiler/pom.xml
@@ -190,12 +190,8 @@
       <artifactId>velocity</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-core-asl</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-mapper-asl</artifactId>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-core</artifactId>
     </dependency>
     <dependency>
       <groupId>org.apache.ant</groupId>
diff --git a/lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java b/lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java
index 58c43d0..5470037 100644
--- a/lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java
+++ b/lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java
@@ -40,7 +40,7 @@ import org.apache.avro.LogicalTypes;
 import org.apache.avro.data.Jsr310TimeConversions;
 import org.apache.avro.data.TimeConversions;
 import org.apache.avro.specific.SpecificData;
-import org.codehaus.jackson.JsonNode;
+import com.fasterxml.jackson.databind.JsonNode;
 
 import org.apache.avro.Protocol;
 import org.apache.avro.Protocol.Message;
@@ -641,7 +641,7 @@ public class SpecificCompiler {
       throw new IllegalArgumentException("Can't check string-type of non-string/map type: " + s);
     }
     JsonNode override = s.getJsonProp(prop);
-    if (override != null) return override.getTextValue();
+    if (override != null) return override.textValue();
     switch (stringType) {
     case String:        return "java.lang.String";
     case Utf8:          return "org.apache.avro.util.Utf8";
@@ -818,12 +818,12 @@ public class SpecificCompiler {
     if (value == null)
       return new String[0];
     if (value.isTextual())
-      return new String[] { value.getTextValue() };
+      return new String[] { value.textValue() };
     if (value.isArray()) {
       int i = 0;
       String[] result = new String[value.size()];
       for (JsonNode v : value)
-        result[i++] = v.getTextValue();
+        result[i++] = v.textValue();
       return result;
     }
     return new String[0];
diff --git a/lang/java/compiler/src/main/javacc/org/apache/avro/compiler/idl/idl.jj b/lang/java/compiler/src/main/javacc/org/apache/avro/compiler/idl/idl.jj
index cae241f..69fd8c5 100644
--- a/lang/java/compiler/src/main/javacc/org/apache/avro/compiler/idl/idl.jj
+++ b/lang/java/compiler/src/main/javacc/org/apache/avro/compiler/idl/idl.jj
@@ -74,8 +74,8 @@ import org.apache.avro.Schema.*;
 import org.apache.avro.Protocol;
 import org.apache.avro.Protocol.*;
 
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.node.*;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.*;
 
 import org.apache.commons.lang.StringEscapeUtils;
 
@@ -132,7 +132,7 @@ public class Idl implements Closeable {
                              Token token) throws ParseException {
     JsonNode value = props.get(key);
     if (value.isTextual())
-      return value.getTextValue();
+      return value.textValue();
     throw error(key+" property must be textual: "+value, token);
   }
 
@@ -144,7 +144,7 @@ public class Idl implements Closeable {
     List<String> values = new ArrayList<String>();
     for (JsonNode n : value)
       if (n.isTextual())
-        values.add(n.getTextValue());
+        values.add(n.textValue());
       else
         throw error(key+" values must be textual: "+n, token);
     return values;
diff --git a/lang/java/compiler/src/test/java/org/apache/avro/compiler/idl/TestIdl.java b/lang/java/compiler/src/test/java/org/apache/avro/compiler/idl/TestIdl.java
index b387144..d6dbef0 100644
--- a/lang/java/compiler/src/test/java/org/apache/avro/compiler/idl/TestIdl.java
+++ b/lang/java/compiler/src/test/java/org/apache/avro/compiler/idl/TestIdl.java
@@ -34,8 +34,8 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.avro.Protocol;
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.map.ObjectMapper;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.junit.Before;
 import org.junit.Test;
 
diff --git a/lang/java/ipc/pom.xml b/lang/java/ipc/pom.xml
index fbd44f0..4358cba 100644
--- a/lang/java/ipc/pom.xml
+++ b/lang/java/ipc/pom.xml
@@ -115,14 +115,12 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-core-asl</artifactId>
-      <version>${jackson.version}</version>
+        <groupId>com.fasterxml.jackson.core</groupId>
+        <artifactId>jackson-core</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-mapper-asl</artifactId>
-      <version>${jackson.version}</version>
+        <groupId>com.fasterxml.jackson.core</groupId>
+        <artifactId>jackson-databind</artifactId>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jetty</groupId>
diff --git a/lang/java/ipc/src/test/java/org/apache/avro/specific/TestSpecificData.java b/lang/java/ipc/src/test/java/org/apache/avro/specific/TestSpecificData.java
index de0da4e..fca1fbe 100644
--- a/lang/java/ipc/src/test/java/org/apache/avro/specific/TestSpecificData.java
+++ b/lang/java/ipc/src/test/java/org/apache/avro/specific/TestSpecificData.java
@@ -30,9 +30,9 @@ import java.io.ObjectOutputStream;
 
 import org.apache.avro.FooBarSpecificRecord;
 import org.apache.avro.TypeEnum;
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.JsonParser;
-import org.codehaus.jackson.map.ObjectMapper;
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.junit.Test;
 import org.junit.Assert;
 
diff --git a/lang/java/mapred/pom.xml b/lang/java/mapred/pom.xml
index e836ba6..fb705ef 100644
--- a/lang/java/mapred/pom.xml
+++ b/lang/java/mapred/pom.xml
@@ -163,12 +163,8 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-core-asl</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-mapper-asl</artifactId>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-core</artifactId>
     </dependency>
     <dependency>
       <groupId>commons-codec</groupId>
diff --git a/lang/java/maven-plugin/src/test/resources/unit/idl/pom-joda.xml b/lang/java/maven-plugin/src/test/resources/unit/idl/pom-joda.xml
index 92c761d..442fdb5 100644
--- a/lang/java/maven-plugin/src/test/resources/unit/idl/pom-joda.xml
+++ b/lang/java/maven-plugin/src/test/resources/unit/idl/pom-joda.xml
@@ -60,9 +60,9 @@
       <version>${parent.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-mapper-asl</artifactId>
-      <version>1.9.10</version>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+      <version>2.9.7</version>
     </dependency>
   </dependencies>
 
diff --git a/lang/java/maven-plugin/src/test/resources/unit/idl/pom-jsr310.xml b/lang/java/maven-plugin/src/test/resources/unit/idl/pom-jsr310.xml
index 5709945..ae8fb0c 100644
--- a/lang/java/maven-plugin/src/test/resources/unit/idl/pom-jsr310.xml
+++ b/lang/java/maven-plugin/src/test/resources/unit/idl/pom-jsr310.xml
@@ -60,9 +60,9 @@
       <version>${parent.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-mapper-asl</artifactId>
-      <version>1.9.10</version>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+      <version>2.9.7</version>
     </dependency>
   </dependencies>
 
diff --git a/lang/java/maven-plugin/src/test/resources/unit/protocol/pom-joda.xml b/lang/java/maven-plugin/src/test/resources/unit/protocol/pom-joda.xml
index 68ddcdc..0282e4d 100644
--- a/lang/java/maven-plugin/src/test/resources/unit/protocol/pom-joda.xml
+++ b/lang/java/maven-plugin/src/test/resources/unit/protocol/pom-joda.xml
@@ -58,9 +58,9 @@
       <version>${parent.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-mapper-asl</artifactId>
-      <version>1.9.10</version>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+      <version>2.9.7</version>
     </dependency>
   </dependencies>
 
diff --git a/lang/java/maven-plugin/src/test/resources/unit/protocol/pom-jsr310.xml b/lang/java/maven-plugin/src/test/resources/unit/protocol/pom-jsr310.xml
index 5ad5bba..e12bf6d 100644
--- a/lang/java/maven-plugin/src/test/resources/unit/protocol/pom-jsr310.xml
+++ b/lang/java/maven-plugin/src/test/resources/unit/protocol/pom-jsr310.xml
@@ -59,9 +59,9 @@
       <version>${parent.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-mapper-asl</artifactId>
-      <version>1.9.10</version>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+      <version>2.9.7</version>
     </dependency>
   </dependencies>
 
diff --git a/lang/java/maven-plugin/src/test/resources/unit/schema/pom-joda.xml b/lang/java/maven-plugin/src/test/resources/unit/schema/pom-joda.xml
index f31692b..2d433b0 100644
--- a/lang/java/maven-plugin/src/test/resources/unit/schema/pom-joda.xml
+++ b/lang/java/maven-plugin/src/test/resources/unit/schema/pom-joda.xml
@@ -62,9 +62,9 @@
       <version>${parent.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-mapper-asl</artifactId>
-      <version>1.9.10</version>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+      <version>2.9.7</version>
     </dependency>
   </dependencies>
 
diff --git a/lang/java/maven-plugin/src/test/resources/unit/schema/pom-jsr310.xml b/lang/java/maven-plugin/src/test/resources/unit/schema/pom-jsr310.xml
index a439363..21ebb5a 100644
--- a/lang/java/maven-plugin/src/test/resources/unit/schema/pom-jsr310.xml
+++ b/lang/java/maven-plugin/src/test/resources/unit/schema/pom-jsr310.xml
@@ -63,9 +63,9 @@
       <version>${parent.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-mapper-asl</artifactId>
-      <version>1.9.10</version>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+      <version>2.9.7</version>
     </dependency>
   </dependencies>
 
diff --git a/lang/java/pom.xml b/lang/java/pom.xml
index 74d8e2d..0e85906 100644
--- a/lang/java/pom.xml
+++ b/lang/java/pom.xml
@@ -39,7 +39,7 @@
     <!-- version properties for dependencies -->
 
     <hadoop2.version>2.7.3</hadoop2.version>
-    <jackson.version>1.9.13</jackson.version>
+    <jackson.version>2.9.7</jackson.version>
     <jetty.version>9.4.12.v20180830</jetty.version>
     <jopt-simple.version>5.0.4</jopt-simple.version>
     <junit.version>4.12</junit.version>
@@ -413,13 +413,13 @@
   <dependencyManagement>
     <dependencies>
       <dependency>
-        <groupId>org.codehaus.jackson</groupId>
-        <artifactId>jackson-core-asl</artifactId>
+        <groupId>com.fasterxml.jackson.core</groupId>
+        <artifactId>jackson-core</artifactId>
         <version>${jackson.version}</version>
       </dependency>
       <dependency>
-        <groupId>org.codehaus.jackson</groupId>
-        <artifactId>jackson-mapper-asl</artifactId>
+        <groupId>com.fasterxml.jackson.core</groupId>
+        <artifactId>jackson-databind</artifactId>
         <version>${jackson.version}</version>
       </dependency>
       <dependency>
diff --git a/lang/java/protobuf/pom.xml b/lang/java/protobuf/pom.xml
index 0944b53..313ab25 100644
--- a/lang/java/protobuf/pom.xml
+++ b/lang/java/protobuf/pom.xml
@@ -85,14 +85,12 @@
       <version>${protobuf.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-core-asl</artifactId>
-      <version>${jackson.version}</version>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-core</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-mapper-asl</artifactId>
-      <version>${jackson.version}</version>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
     </dependency>
   </dependencies>
 
diff --git a/lang/java/protobuf/src/main/java/org/apache/avro/protobuf/ProtobufData.java b/lang/java/protobuf/src/main/java/org/apache/avro/protobuf/ProtobufData.java
index b07b7f3..7f9ae4e 100644
--- a/lang/java/protobuf/src/main/java/org/apache/avro/protobuf/ProtobufData.java
+++ b/lang/java/protobuf/src/main/java/org/apache/avro/protobuf/ProtobufData.java
@@ -46,10 +46,10 @@ import com.google.protobuf.Descriptors.FileDescriptor;
 import com.google.protobuf.DescriptorProtos.FileOptions;
 
 import org.apache.avro.util.ClassUtils;
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.node.JsonNodeFactory;
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
 
 /** Utilities for serializing Protobuf data in Avro format. */
 public class ProtobufData extends GenericData {
diff --git a/lang/java/thrift/pom.xml b/lang/java/thrift/pom.xml
index 07fe52b..ce3c591 100644
--- a/lang/java/thrift/pom.xml
+++ b/lang/java/thrift/pom.xml
@@ -91,9 +91,8 @@
       <version>${thrift.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-core-asl</artifactId>
-      <version>${jackson.version}</version>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-core</artifactId>
     </dependency>
   </dependencies>
 
diff --git a/lang/java/tools/pom.xml b/lang/java/tools/pom.xml
index 11bac66..2137e08 100644
--- a/lang/java/tools/pom.xml
+++ b/lang/java/tools/pom.xml
@@ -243,9 +243,8 @@
       <version>${project.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.jackson</groupId>
-      <artifactId>jackson-core-asl</artifactId>
-      <version>${jackson.version}</version>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-core</artifactId>
     </dependency>
     <dependency>
       <groupId>org.apache.hadoop</groupId>
diff --git a/lang/java/tools/src/main/java/org/apache/avro/tool/RpcSendTool.java b/lang/java/tools/src/main/java/org/apache/avro/tool/RpcSendTool.java
index 352a381..8582a91 100644
--- a/lang/java/tools/src/main/java/org/apache/avro/tool/RpcSendTool.java
+++ b/lang/java/tools/src/main/java/org/apache/avro/tool/RpcSendTool.java
@@ -37,9 +37,9 @@ import org.apache.avro.io.EncoderFactory;
 import org.apache.avro.ipc.Ipc;
 import org.apache.avro.ipc.generic.GenericRequestor;
 
-import org.codehaus.jackson.JsonEncoding;
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.JsonGenerator;
+import com.fasterxml.jackson.core.JsonEncoding;
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.core.JsonGenerator;
 
 /**
  * Sends a single RPC message.
diff --git a/lang/java/tools/src/main/java/org/apache/avro/tool/TrevniMetadataTool.java b/lang/java/tools/src/main/java/org/apache/avro/tool/TrevniMetadataTool.java
index 87aa108..1cbfc4b 100644
--- a/lang/java/tools/src/main/java/org/apache/avro/tool/TrevniMetadataTool.java
+++ b/lang/java/tools/src/main/java/org/apache/avro/tool/TrevniMetadataTool.java
@@ -28,10 +28,10 @@ import org.apache.trevni.ColumnFileReader;
 import org.apache.trevni.MetaData;
 import org.apache.trevni.ColumnMetaData;
 
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.JsonEncoding;
-import org.codehaus.jackson.util.MinimalPrettyPrinter;
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonEncoding;
+import com.fasterxml.jackson.core.util.MinimalPrettyPrinter;
 
 /** Tool to print Trevni file metadata as JSON. */
 public class TrevniMetadataTool implements Tool {
diff --git a/lang/java/tools/src/main/java/org/apache/avro/tool/TrevniToJsonTool.java b/lang/java/tools/src/main/java/org/apache/avro/tool/TrevniToJsonTool.java
index 6c549d1..fd2674a 100644
--- a/lang/java/tools/src/main/java/org/apache/avro/tool/TrevniToJsonTool.java
+++ b/lang/java/tools/src/main/java/org/apache/avro/tool/TrevniToJsonTool.java
@@ -27,10 +27,10 @@ import org.apache.trevni.ColumnFileReader;
 import org.apache.trevni.ColumnMetaData;
 import org.apache.trevni.ColumnValues;
 
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.JsonEncoding;
-import org.codehaus.jackson.util.MinimalPrettyPrinter;
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonEncoding;
+import com.fasterxml.jackson.core.util.MinimalPrettyPrinter;
 
 /** Tool to read Trevni files and print them as JSON.
  * This can read any Trevni file.  Nested structure is reconstructed from the


Mime
View raw message