avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nkol...@apache.org
Subject [avro] branch master updated: AVRO-2338: Remove Deprecated Use of JsonStringEncoder (#471)
Date Thu, 07 Mar 2019 09:45:56 GMT
This is an automated email from the ASF dual-hosted git repository.

nkollar 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 f173ae8  AVRO-2338: Remove Deprecated Use of JsonStringEncoder (#471)
f173ae8 is described below

commit f173ae8d690b5f90e8cc5899b654762a9d11e17d
Author: BELUGABEHR <BELUGABEHR@users.noreply.github.com>
AuthorDate: Thu Mar 7 04:45:51 2019 -0500

    AVRO-2338: Remove Deprecated Use of JsonStringEncoder (#471)
---
 lang/java/avro/src/main/java/org/apache/avro/SchemaBuilder.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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 c4b60c2..471de76 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
@@ -32,7 +32,7 @@ import org.apache.avro.generic.GenericData;
 import org.apache.avro.generic.GenericRecord;
 import org.apache.avro.util.internal.JacksonUtils;
 
-import com.fasterxml.jackson.core.io.JsonStringEncoder;
+import com.fasterxml.jackson.core.util.BufferRecyclers;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.TextNode;
@@ -2600,11 +2600,11 @@ public class SchemaBuilder {
         bytes.get(data);
         bytes.reset(); // put the buffer back the way we got it
         s = new String(data, "ISO-8859-1");
-        char[] quoted = JsonStringEncoder.getInstance().quoteAsString(s);
+        char[] quoted = BufferRecyclers.getJsonStringEncoder().quoteAsString(s);
         s = "\"" + new String(quoted) + "\"";
       } else if (o instanceof byte[]) {
         s = new String((byte[]) o, "ISO-8859-1");
-        char[] quoted = JsonStringEncoder.getInstance().quoteAsString(s);
+        char[] quoted = BufferRecyclers.getJsonStringEncoder().quoteAsString(s);
         s = '\"' + new String(quoted) + '\"';
       } else {
         s = GenericData.get().toString(o);


Mime
View raw message