kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ewe...@apache.org
Subject kafka git commit: MINOR: Make asJsonSchema() and asConnectSchema() methods public
Date Tue, 28 Feb 2017 19:49:23 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 9231cc439 -> 8e6fbe8fe


MINOR: Make asJsonSchema() and asConnectSchema() methods public

Want to use these methods in an external project.

Author: Chris Egerton <fearthecellos@gmail.com>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes #2610 from C0urante/public-json-schema-conversion


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/8e6fbe8f
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/8e6fbe8f
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/8e6fbe8f

Branch: refs/heads/trunk
Commit: 8e6fbe8fed592e7cc15731a0827c350794413767
Parents: 9231cc4
Author: Chris Egerton <fearthecellos@gmail.com>
Authored: Tue Feb 28 11:49:16 2017 -0800
Committer: Ewen Cheslack-Postava <me@ewencp.org>
Committed: Tue Feb 28 11:49:16 2017 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/kafka/connect/json/JsonConverter.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/8e6fbe8f/connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java
----------------------------------------------------------------------
diff --git a/connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java b/connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java
index dd83886..c5d4858 100644
--- a/connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java
+++ b/connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java
@@ -332,7 +332,7 @@ public class JsonConverter implements Converter {
         return new SchemaAndValue(schema, convertToConnect(schema, jsonValue.get(JsonSchema.ENVELOPE_PAYLOAD_FIELD_NAME)));
     }
 
-    private ObjectNode asJsonSchema(Schema schema) {
+    public ObjectNode asJsonSchema(Schema schema) {
         if (schema == null)
             return null;
 
@@ -413,7 +413,7 @@ public class JsonConverter implements Converter {
     }
 
 
-    private Schema asConnectSchema(JsonNode jsonSchema) {
+    public Schema asConnectSchema(JsonNode jsonSchema) {
         if (jsonSchema.isNull())
             return null;
 


Mime
View raw message