avro-commits mailing list archives

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


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

Branch: refs/heads/master
Commit: 09c997e206615c4b23ab9ae2ab5f6a3d793e9afb
Parents: 15651fc
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:54:59 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/09c997e2/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 c36ed97..f01775d 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
@@ -1297,7 +1297,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