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: fix grammatical errors in DataException message
Date Fri, 24 Jun 2016 21:16:55 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 88924b03d -> 54f9a7012


MINOR: fix grammatical errors in DataException message

Was just reading kafka source code, my favourite Friday afternoon activity, when I found these
small grammatical errors in some `DataException` messages.

Could someone please review? ewencp dguy

Author: Laurier Mantel <laurier.mantel@shopify.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #1551 from LaurierMantel/maps-typos


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

Branch: refs/heads/trunk
Commit: 54f9a7012c05f3e2993463727d7e199e8589e68e
Parents: 88924b0
Author: Laurier Mantel <laurier.mantel@shopify.com>
Authored: Fri Jun 24 14:16:50 2016 -0700
Committer: Ewen Cheslack-Postava <me@ewencp.org>
Committed: Fri Jun 24 14:16:50 2016 -0700

----------------------------------------------------------------------
 .../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/54f9a701/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 59e653e..f6c778b 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
@@ -161,7 +161,7 @@ public class JsonConverter implements Converter {
                 Map<Object, Object> result = new HashMap<>();
                 if (schema == null || keySchema.type() == Schema.Type.STRING) {
                     if (!value.isObject())
-                        throw new DataException("Map's with string fields should be encoded
as JSON objects, but found " + value.getNodeType());
+                        throw new DataException("Maps with string fields should be encoded
as JSON objects, but found " + value.getNodeType());
                     Iterator<Map.Entry<String, JsonNode>> fieldIt = value.fields();
                     while (fieldIt.hasNext()) {
                         Map.Entry<String, JsonNode> entry = fieldIt.next();
@@ -169,7 +169,7 @@ public class JsonConverter implements Converter {
                     }
                 } else {
                     if (!value.isArray())
-                        throw new DataException("Map's with non-string fields should be encoded
as JSON array of tuples, but found " + value.getNodeType());
+                        throw new DataException("Maps with non-string fields should be encoded
as JSON array of tuples, but found " + value.getNodeType());
                     for (JsonNode entry : value) {
                         if (!entry.isArray())
                             throw new DataException("Found invalid map entry instead of array
tuple: " + entry.getNodeType());


Mime
View raw message