You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Roman Leventov (Jira)" <ji...@apache.org> on 2020/02/07 07:40:00 UTC
[jira] [Created] (AVRO-2731) Avro should not use new
HashMap(targetSize) in generated code for records
Roman Leventov created AVRO-2731:
------------------------------------
Summary: Avro should not use new HashMap(targetSize) in generated code for records
Key: AVRO-2731
URL: https://issues.apache.org/jira/browse/AVRO-2731
Project: Apache Avro
Issue Type: Improvement
Reporter: Roman Leventov
[https://github.com/apache/avro/blob/4a1e3acdc09de0545cbb6bfd4554604e64ca1a35/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm#L808]
This is improper usage of HashMap constructor. See Guava's [Maps.newHashMapWithExpectedSize|[https://github.com/google/guava/blob/6e0c5b5d50a3e457ae0d787f7c9be7b48c10120b/guava/src/com/google/common/collect/Maps.java#L306-L337]] code for details.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)