kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gwens...@apache.org
Subject kafka git commit: MINOR: Fix BNF output for protocol arrays conataining primitives in docs
Date Fri, 01 Apr 2016 20:56:29 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.10.0 fd07af3fd -> e32aeec97


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

(cherry picked from commit b865413cd8b71f905ad4ee695f193dcf91ee0595)
Signed-off-by: Gwen Shapira <cshapi@gmail.com>


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

Branch: refs/heads/0.10.0
Commit: e32aeec97b472dfa7c5e089407b778225d65cdf7
Parents: fd07af3
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:22 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/e32aeec9/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