[
https://issues.apache.org/jira/browse/AVRO-2692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17039804#comment-17039804
]
ASF subversion and git services commented on AVRO-2692:
-------------------------------------------------------
Commit 37be95b0bd64b9ecc118d0ff8b30e734f94e4d3c in avro's branch
refs/heads/master from belugabehr
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=37be95b ]
AVRO-2692: Do Not Access Map Twice in LogicalTypes (#772)
* AVRO-2692: Do Not Access Map Twice in LogicalTypes
* Apply spotless
> Do Not Access Map Twice in LogicalTypes
> ---------------------------------------
>
> Key: AVRO-2692
> URL: https://issues.apache.org/jira/browse/AVRO-2692
> Project: Apache Avro
> Issue Type: Improvement
> Reporter: David Mollitor
> Assignee: David Mollitor
> Priority: Minor
> Fix For: 1.10.0
>
>
> https://github.com/apache/avro/blob/84b056c2adc069cf31f3b4d3c9337cb7cdaa58d6/lang/java/avro/src/main/java/org/apache/avro/LogicalTypes.java#L102-L107
> {code:java|title=LogicalTypes.java}
> final LogicalTypeFactory typeFactory = REGISTERED_TYPES.get(typeName);
> if (typeFactory != null) {
> logicalType = REGISTERED_TYPES.get(typeName).fromSchema(schema);
> } else {
> logicalType = null;
> }
> {code}
> The {{typeFactory}} is already obtained from the map on the first line, no
> need to go back to the map again to {{get}} it.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)