avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject [7/7] avro git commit: AVRO-1574: Create list for schema symbols with specified size.
Date Fri, 18 Aug 2017 14:57:31 GMT
AVRO-1574: Create list for schema symbols with specified size.

Signed-off-by: Nandor Kollar <nkollar@cloudera.com>
Signed-off-by: Sean Busbey <busbey@apache.org>
(cherry picked from commit 09c997e206615c4b23ab9ae2ab5f6a3d793e9afb)
(cherry picked from commit 2f6eb2f4ec2071bc03e52a3ba8ac1d6aeb954c88)


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

Branch: refs/heads/branch-1.7
Commit: 58ebac451d176280febe5b2e95f78e6a065be4ec
Parents: 522b59b
Author: Kengo Seki <sekikn@apache.org>
Authored: Fri Aug 18 09:19:28 2017 -0500
Committer: Sean Busbey <busbey@apache.org>
Committed: Fri Aug 18 09:56:53 2017 -0500

----------------------------------------------------------------------
 lang/java/avro/src/main/java/org/apache/avro/Schema.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/avro/blob/58ebac45/lang/java/avro/src/main/java/org/apache/avro/Schema.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/Schema.java b/lang/java/avro/src/main/java/org/apache/avro/Schema.java
index e56141a..9a45a61 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/Schema.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/Schema.java
@@ -1260,7 +1260,7 @@ public abstract class Schema extends JsonProperties {
         JsonNode symbolsNode = schema.get("symbols");
         if (symbolsNode == null || !symbolsNode.isArray())
           throw new SchemaParseException("Enum has no symbols: "+schema);
-        LockableArrayList<String> symbols = new LockableArrayList<String>();
+        LockableArrayList<String> symbols = new LockableArrayList<String>(symbolsNode.size());
         for (JsonNode n : symbolsNode)
           symbols.add(n.getTextValue());
         result = new EnumSchema(name, doc, symbols);


Mime
View raw message