kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gwens...@apache.org
Subject [13/50] [abbrv] kafka git commit: MINOR: Fix BNF output for protocol arrays conataining primitives in docs
Date Mon, 11 Apr 2016 23:09:29 GMT
MINOR: Fix BNF output for protocol arrays conataining primitives in docs

Before this patch arrays containing primitive types were not output:
```
Metadata Request (Version: 0) => [topics]
```

After this patch the type is listed:
```
Metadata Request (Version: 0) => [topics]
      topics => STRING
```

Author: Grant Henke <granthenke@gmail.com>

Reviewers: Ashish Singh, Gwen Shapira

Closes #1174 from granthenke/protocol-arrays


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

Branch: refs/heads/0.10.0
Commit: b865413cd8b71f905ad4ee695f193dcf91ee0595
Parents: ae93946
Author: Grant Henke <granthenke@gmail.com>
Authored: Fri Apr 1 13:56:11 2016 -0700
Committer: Gwen Shapira <cshapi@gmail.com>
Committed: Fri Apr 1 13:56:11 2016 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/kafka/common/protocol/Protocol.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/b865413c/clients/src/main/java/org/apache/kafka/common/protocol/Protocol.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/common/protocol/Protocol.java b/clients/src/main/java/org/apache/kafka/common/protocol/Protocol.java
index 43110b5..475a4f2 100644
--- a/clients/src/main/java/org/apache/kafka/common/protocol/Protocol.java
+++ b/clients/src/main/java/org/apache/kafka/common/protocol/Protocol.java
@@ -792,13 +792,13 @@ public class Protocol {
                 b.append(field.name);
                 b.append("] ");
                 Type innerType = ((ArrayOf) field.type).type();
-                if (innerType instanceof Schema && !subTypes.containsKey(field.name))
-                    subTypes.put(field.name, (Schema) innerType);
+                if (!subTypes.containsKey(field.name))
+                    subTypes.put(field.name, innerType);
             } else if (field.type instanceof Schema) {
                 b.append(field.name);
                 b.append(" ");
                 if (!subTypes.containsKey(field.name))
-                    subTypes.put(field.name, (Schema) field.type);
+                    subTypes.put(field.name, field.type);
             } else {
                 b.append(field.name);
                 b.append(" ");


Mime
View raw message